aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/servo/testing_commands.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 7711c1bfe17..a09af2b1f7a 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -337,7 +337,7 @@ class MachCommands(CommandBase):
parser=create_parser_wpt)
def test_wpt(self, **kwargs):
self.ensure_bootstrapped()
- return self.run_test_list_or_dispatch("wpt", self._test_wpt, **kwargs)
+ return self.run_test_list_or_dispatch(kwargs["test_list"], "wpt", self._test_wpt, **kwargs)
def _test_wpt(self, **kwargs):
hosts_file_path = path.join(self.context.topdir, 'tests', 'wpt', 'hosts')
@@ -346,14 +346,13 @@ class MachCommands(CommandBase):
return self.wptrunner(run_file, **kwargs)
# Helper to ensure all specified paths are handled, otherwise dispatch to appropriate test suite.
- def run_test_list_or_dispatch(self, correct_suite, correct_function, **kwargs):
- test_list = kwargs["test_list"]
- if not test_list:
+ def run_test_list_or_dispatch(self, requested_paths, correct_suite, correct_function, **kwargs):
+ if not requested_paths:
return correct_function(**kwargs)
else:
# Paths specified on command line. Ensure they can be handled, re-dispatch otherwise.
all_handled = True
- for test_path in test_list:
+ for test_path in requested_paths:
suite = self.suite_for_path(test_path)
if correct_suite != suite:
all_handled = False
@@ -362,7 +361,7 @@ class MachCommands(CommandBase):
return correct_function(**kwargs)
else:
# Dispatch each test to the correct suite via test()
- Registrar.dispatch("test", context=self.context, params=test_list)
+ Registrar.dispatch("test", context=self.context, params=requested_paths)
# Helper for test_css and test_wpt:
def wptrunner(self, run_file, **kwargs):
@@ -441,7 +440,7 @@ class MachCommands(CommandBase):
parser=create_parser_wpt)
def test_css(self, **kwargs):
self.ensure_bootstrapped()
- return self.run_test_list_or_dispatch("css", self._test_css, **kwargs)
+ return self.run_test_list_or_dispatch(kwargs["test_list"], "css", self._test_css, **kwargs)
def _test_css(self, **kwargs):
run_file = path.abspath(path.join("tests", "wpt", "run_css.py"))