From e4da6a347b4675630f68d854258fcaecafc0c9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 7 Jul 2023 15:36:18 +0200 Subject: [PATCH] test-tool: Require script argument The purpose of the tool has shifted from running a limited set of performance tests repeatedly to collect performance data and catch regressions, to a wrapper that drives gnome-shell via scripts for tests. With that, the concept of a "default" script doesn't really make sense anymore. Instead, turn the argument from an optional flag into a required parameter. This will allow us to stop bundling the existing tests in a follow-up commit. Part-of: --- src/gnome-shell-test-tool.in | 11 +++-------- tests/meson.build | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/gnome-shell-test-tool.in b/src/gnome-shell-test-tool.in index 3911df8ff..536409348 100755 --- a/src/gnome-shell-test-tool.in +++ b/src/gnome-shell-test-tool.in @@ -288,8 +288,9 @@ def run_performance_test(wrap=None): # Main program parser = argparse.ArgumentParser() -parser.add_argument("--script", - help="Specify the path to the automation script to run") +parser.add_argument("script", + metavar="AUTOMATION_SCRIPT", + help="Automation script to run") parser.add_argument("--test-iters", type=int, metavar="ITERS", help="Numbers of iterations of the test to run", default=1) @@ -323,12 +324,6 @@ parser.add_argument("--hotplug", action="store_true", options = parser.parse_args() -if options.script == None: - if options.hwtest: - options.script = 'resource:///org/gnome/shell/perf/hwtest.js' - else: - options.script = 'resource:///org/gnome/shell/perf/core.js' - if options.extra_filter is None: options.extra_filter = [] diff --git a/tests/meson.build b/tests/meson.build index f2ccf0aa7..49cc3b1c2 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -71,8 +71,8 @@ foreach shell_test : shell_tests args: [ test_tool, '--headless', - '--script=@0@/js/perf/@1@.js'.format(meson.project_source_root(), test_name), options, + '@0@/js/perf/@1@.js'.format(meson.project_source_root(), test_name), ], is_parallel: false, env: shell_testenv,