diff options
author | Damien George <damien.p.george@gmail.com> | 2020-05-02 15:58:41 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-05-09 00:06:06 +1000 |
commit | 035059eaf592a7e0dbcf7e802f81c414ecb65ab5 (patch) | |
tree | 785f22322b79ad19c893108d10e20a7996780091 | |
parent | 67fca2b7152c6db14ff8a98c40b8121204c9f963 (diff) |
tests/run-multitests.py: Add TRACE banner and move TEST output to end.
To make it easier to understand the output when both -s and -t are used.
-rwxr-xr-x | tests/run-multitests.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/run-multitests.py b/tests/run-multitests.py index 2fd766563..c83895fb6 100755 --- a/tests/run-multitests.py +++ b/tests/run-multitests.py @@ -230,6 +230,9 @@ def run_test_on_instances(test_file, num_instances, instances): injected_globals = "" output = [[] for _ in range(num_instances)] + if cmd_args.trace_output: + print("TRACE {}:".format("|".join(str(i) for i in instances))) + # Start all instances running, in order, waiting until they signal they are ready for idx in range(num_instances): append_code = APPEND_CODE_TEMPLATE.format(injected_globals, idx) @@ -326,10 +329,6 @@ def run_tests(test_files, instances_truth, instances_test): # Run test on test instances error, skip, output_test = run_test_on_instances(test_file, num_instances, instances_test) - if cmd_args.show_output: - print("### TEST ###") - print(output_test, end="") - if not skip: # Check if truth exists in a file, and read it in test_file_expected = test_file + ".exp" @@ -341,7 +340,11 @@ def run_tests(test_files, instances_truth, instances_test): _, _, output_truth = run_test_on_instances( test_file, num_instances, instances_truth ) - if cmd_args.show_output: + + if cmd_args.show_output: + print("### TEST ###") + print(output_test, end="") + if not skip: print("### TRUTH ###") print(output_truth, end="") |