diff --git a/scripts/monitor_dbus_signals.py b/scripts/monitor_dbus_signals.py index 7810cc6..289fad8 100755 --- a/scripts/monitor_dbus_signals.py +++ b/scripts/monitor_dbus_signals.py @@ -731,7 +731,11 @@ def _check(): print(os.linesep.join(_CALLBACK_ERRORS)) sys.exit(3) - result = _check() + try: + result = _check() + except Exception as exco: # pylint: disable=broad-except + print(f"{exco}") + sys.exit(4) assert isinstance(result, list) if not result: diff --git a/testlib/infra.py b/testlib/infra.py index 27aac90..812653e 100644 --- a/testlib/infra.py +++ b/testlib/infra.py @@ -472,6 +472,13 @@ def run_check(self, stop_time): f'stdout: {stdoutdata.decode("utf-8")}' ) + if self.trace.returncode == 4: + raise RuntimeError( + "Failure while comparing D-Bus states: " + f'stderr: {stderrdata.decode("utf-8")}, ' + f'stdout: {stdoutdata.decode("utf-8")}' + ) + msg = stdoutdata.decode("utf-8") self.assertEqual( self.trace.returncode,