From 129dd186fc4ddde2cf4a66e2c4465b8e92069d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Tue, 17 Jun 2025 17:21:33 +0200 Subject: [PATCH] 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 0a6b0cf68c6553f7eeef06fb507c1b28b9c61f38) --- bin/tests/system/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py index a68e4f65c3..1393b0266a 100644 --- a/bin/tests/system/conftest.py +++ b/bin/tests/system/conftest.py @@ -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: