2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Don't log empty test result messages

The messages obtained from test results may contain stuff like detailed
failure/error information, tracebacks etc. In many cases, the message
will be empty, in which case it doesn't need to be logged.

For an example, run test with many test cases, e.g.
verify/test_verify.py, and inspect the tail of the pytest.log.txt before
and after this commit.

(cherry picked from commit 0a6b0cf68c)
This commit is contained in:
Nicki Křížek
2025-06-17 17:21:33 +02:00
parent 2b77921470
commit 129dd186fc

View File

@@ -365,7 +365,8 @@ def system_test_dir(request, system_test_name, expected_artifacts):
isctest.log.debug("%s %s", result.outcome.upper(), node)
messages.extend(result.messages.values())
for message in messages:
isctest.log.debug("\n" + message)
if message:
isctest.log.debug("\n" + message)
failed = any(res.outcome == "failed" for res in test_results.values())
skipped = any(res.outcome == "skipped" for res in test_results.values())
if failed: