From 02eac693df84f5b3bfe56626a550060b5943edf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 5 Aug 2022 12:16:56 +0200 Subject: [PATCH] tests/dbus-runner: Just forward test case exit status This allows tests to skip (return 77) and properly report that to meson. Part-of: --- src/tests/meta-dbus-runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/meta-dbus-runner.py b/src/tests/meta-dbus-runner.py index 79f6a0790..adb7d815c 100755 --- a/src/tests/meta-dbus-runner.py +++ b/src/tests/meta-dbus-runner.py @@ -168,7 +168,7 @@ ret = (unix_fd, False) args = wrapper.split(' ') + args p = subprocess.Popen(args, env=env) - self.assertEqual(p.wait(), 0) + return p.wait() if __name__ == '__main__': @@ -179,8 +179,10 @@ if __name__ == '__main__': MutterDBusTestCase.setUpClass(args.kvm) test_case = MutterDBusTestCase() test_case.assertGreater(len(rest), 1) + result = 1 try: print('Running test case...', file=sys.stderr) - test_case.wrap_call(rest[1:]) + result = test_case.wrap_call(rest[1:]) finally: MutterDBusTestCase.tearDownClass() + sys.exit(result)