From: Pablo Neira Ayuso Date: Fri, 26 May 2017 10:49:26 +0000 (+0100) Subject: tests: py: flush stdout on each test run X-Git-Tag: v0.8~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9330ccf64c4cc17673549bfb6a88acdbd73a8dd5;p=thirdparty%2Fnftables.git tests: py: flush stdout on each test run Useful when redirecting output to file and tail -f it. Signed-off-by: Pablo Neira Ayuso --- 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()