From 88f4b3d427893493776b703ba16db125a215a8d6 Mon Sep 17 00:00:00 2001 From: mulhern Date: Fri, 13 Dec 2024 20:34:41 -0500 Subject: [PATCH] Always print stderrdata from D-bus monitor on test failure Signed-off-by: mulhern --- testlib/infra.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/testlib/infra.py b/testlib/infra.py index 8530b1c..c426d81 100644 --- a/testlib/infra.py +++ b/testlib/infra.py @@ -531,19 +531,20 @@ def run_check(self, stop_time): f'stdout: {stdoutdata.decode("utf-8")}' ) - msg = stdoutdata.decode("utf-8") self.assertEqual( self.trace.returncode, 0, ( - stderrdata.decode("utf-8") - if len(msg) == 0 - else ( - "Error from monitor_dbus_signals: " - + os.linesep - + os.linesep - + msg - ) + "Log from monitor_dbus_signals: " + + os.linesep + + os.linesep + + stderrdata.decode("utf-8") + + os.linesep + + os.linesep + + "Error from monitor_dbus_signals: " + + os.linesep + + os.linesep + + stdoutdata.decode("utf-8") ), )