From d2c4914546c908e1b9a93fd595ca987705249fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Aug 2022 16:32:49 +0200 Subject: [PATCH] tests/dbus-runner: Don't consume options after '--' This allows passing arguments to test cases that conflict with meta-dbus-runner.py. Part-of: --- src/tests/meta-dbus-runner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tests/meta-dbus-runner.py b/src/tests/meta-dbus-runner.py index adb7d815c..512328c35 100755 --- a/src/tests/meta-dbus-runner.py +++ b/src/tests/meta-dbus-runner.py @@ -176,13 +176,17 @@ if __name__ == '__main__': parser.add_argument('--kvm', action='store_true', default=False) (args, rest) = parser.parse_known_args(sys.argv) + rest.pop(0) + if rest[0] == '--': + rest.pop(0) + MutterDBusTestCase.setUpClass(args.kvm) test_case = MutterDBusTestCase() - test_case.assertGreater(len(rest), 1) + test_case.assertGreater(len(rest), 0) result = 1 try: print('Running test case...', file=sys.stderr) - result = test_case.wrap_call(rest[1:]) + result = test_case.wrap_call(rest) finally: MutterDBusTestCase.tearDownClass() sys.exit(result)