From 9330ccf64c4cc17673549bfb6a88acdbd73a8dd5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 26 May 2017 11:49:26 +0100 Subject: tests: py: flush stdout on each test run Useful when redirecting output to file and tail -f it. Signed-off-by: Pablo Neira Ayuso --- tests/py/nft-test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py index 8d1df3bc..c1da71aa 100755 --- a/tests/py/nft-test.py +++ b/tests/py/nft-test.py @@ -955,6 +955,8 @@ def run_test_file(filename, force_all_family_option, specific_file): tests = passed = total_unit_run = total_warning = total_error = 0 for lineno, line in enumerate(f): + sys.stdout.flush() + if signal_received == 1: print "\nSignal received. Cleaning up and Exitting..." cleanup_on_exit() -- cgit v1.2.3