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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2812>
This commit is contained in:
parent
9bb003463c
commit
e4da6a347b
@ -288,8 +288,9 @@ def run_performance_test(wrap=None):
|
|||||||
# Main program
|
# Main program
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("--script",
|
parser.add_argument("script",
|
||||||
help="Specify the path to the automation script to run")
|
metavar="AUTOMATION_SCRIPT",
|
||||||
|
help="Automation script to run")
|
||||||
parser.add_argument("--test-iters", type=int, metavar="ITERS",
|
parser.add_argument("--test-iters", type=int, metavar="ITERS",
|
||||||
help="Numbers of iterations of the test to run",
|
help="Numbers of iterations of the test to run",
|
||||||
default=1)
|
default=1)
|
||||||
@ -323,12 +324,6 @@ parser.add_argument("--hotplug", action="store_true",
|
|||||||
|
|
||||||
options = parser.parse_args()
|
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:
|
if options.extra_filter is None:
|
||||||
options.extra_filter = []
|
options.extra_filter = []
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@ foreach shell_test : shell_tests
|
|||||||
args: [
|
args: [
|
||||||
test_tool,
|
test_tool,
|
||||||
'--headless',
|
'--headless',
|
||||||
'--script=@0@/js/perf/@1@.js'.format(meson.project_source_root(), test_name),
|
|
||||||
options,
|
options,
|
||||||
|
'@0@/js/perf/@1@.js'.format(meson.project_source_root(), test_name),
|
||||||
],
|
],
|
||||||
is_parallel: false,
|
is_parallel: false,
|
||||||
env: shell_testenv,
|
env: shell_testenv,
|
||||||
|
Loading…
Reference in New Issue
Block a user