Skip to content

Commit

Permalink
Always print stderrdata from D-bus monitor on test failure
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Jan 17, 2025
1 parent f27085e commit 88f4b3d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions testlib/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
),
)

Expand Down

0 comments on commit 88f4b3d

Please sign in to comment.