]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: flush stdout on each test run
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 26 May 2017 10:49:26 +0000 (11:49 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 29 May 2017 11:00:37 +0000 (13:00 +0200)
Useful when redirecting output to file and tail -f it.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/nft-test.py

index 8d1df3bc517aadb42d67072851b993ed70667adf..c1da71aaf827921d3e11bb6eda67a06d7a48ab89 100755 (executable)
@@ -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()