summaryrefslogtreecommitdiffstats
path: root/tests/py
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-05-26 11:49:26 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-05-29 13:00:37 +0200
commit9330ccf64c4cc17673549bfb6a88acdbd73a8dd5 (patch)
treeed3cf247273ce9cde88ec4d16f301297e345652a /tests/py
parent986dea8a4a9d612a63508f628d342f70146ac6d0 (diff)
tests: py: flush stdout on each test run
Useful when redirecting output to file and tail -f it. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py')
-rwxr-xr-xtests/py/nft-test.py2
1 files changed, 2 insertions, 0 deletions
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()