Commit 5beb8bf3 authored by Robert Schmidt's avatar Robert Schmidt

Print results of physims

Remove the runtime, which is not interesting, and add instead
- test name and if the test failed
- the threshold checks, if any, and
- possible additional information about test failures.
parent eb9e4ef9
......@@ -90,13 +90,16 @@ class Analysis():
with open(f'{log_dir}/{test_name}.log', 'w') as f:
f.write(output)
# prepare result and info
info = f"Runtime: {f'{time:.3f}'[:5]} s"
resultstr = 'PASS' if (test_check and time_check and output_check) else 'FAIL'
info = f"{test_name}.log: test {resultstr}"
for l in output.splitlines():
if l.startswith("CHECK "):
info += f"\n{l}"
if test_check:
if not output_check:
info += " Test log exceeds maximal allowed length 100 kB"
info += "\nTest log exceeds maximal allowed length 100 kB"
if not time_check:
info += " Test exceeds 150s"
info += "\nTest exceeds 150s"
if not (time_check and output_check):
nb_failed += 1 # time threshold/output length error, not counted for by ctest as of now
test_result[test_name] = [desc, info, resultstr]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment