From 21b670fad8cb43e28922f539f571875c15d6a2f4 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 3 Jun 2020 14:41:55 -0400 Subject: [PATCH] Run only a supported set of WPT test types by default. --- python/servo/testing_commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 5af2bd122ba..b5b2160fee0 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -82,6 +82,8 @@ def create_parser_wpt(): help="Servo's JSON logger of unexpected results") parser.add_argument('--always-succeed', default=False, action="store_true", help="Always yield exit code of zero") + parser.add_argument('--no-default-test-types', default=False, action="store_true", + help="Run all of the test types provided by wptrunner or specified explicitly by --test-types"), return parser @@ -463,6 +465,14 @@ class MachCommands(CommandBase): binary_args.append("--pref=" + pref) kwargs["binary_args"] = binary_args + if not kwargs.get('no_default_test_types'): + test_types = { + "servo": ["testharness", "reftest", "wdspec"], + "servodriver": ["testharness", "reftest"], + } + product = kwargs.get("product") or "servo" + kwargs["test_types"] = test_types[product] + run_globals = {"__file__": run_file} exec(compile(open(run_file).read(), run_file, 'exec'), run_globals) return run_globals["run_tests"](**kwargs)