Commit b0ca92cb authored by Stephen McGruer's avatar Stephen McGruer Committed by Commit Bot

[run_wpt_tests.py] Allow passing individual tests or directories

This is required for the MVP builders, which will run a subset of the
WPT tests for Web Payments and Web Identity. It is also useful for local
users of the script, to let them not run the entire WPT test suite.

Bug: 1127055
Change-Id: I8142593a2afd9b2bcd94750765a3f626e5484310
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412813
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: default avatarLuke Z <lpz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807567}
parent 5e587d35
...@@ -37,7 +37,8 @@ class WPTTestAdapter(wpt_common.BaseWptScriptAdapter): ...@@ -37,7 +37,8 @@ class WPTTestAdapter(wpt_common.BaseWptScriptAdapter):
"--venv=../../", "--venv=../../",
"--skip-venv-setup", "--skip-venv-setup",
"run", "run",
"chrome", "chrome"
] + self.options.test_list + [
"--binary=../../out/Release/chrome", "--binary=../../out/Release/chrome",
"--binary-arg=--host-resolver-rules=" "--binary-arg=--host-resolver-rules="
"MAP nonexistent.*.test ~NOTFOUND, MAP *.test 127.0.0.1", "MAP nonexistent.*.test ~NOTFOUND, MAP *.test 127.0.0.1",
...@@ -80,6 +81,10 @@ class WPTTestAdapter(wpt_common.BaseWptScriptAdapter): ...@@ -80,6 +81,10 @@ class WPTTestAdapter(wpt_common.BaseWptScriptAdapter):
]) ])
return rest_args return rest_args
def add_extra_arguments(self, parser):
parser.add_argument('test_list', nargs="*",
help="List of tests or test directories to run")
def do_pre_test_run_tasks(self): def do_pre_test_run_tasks(self):
# Generate WPT metadata files. # Generate WPT metadata files.
common.run_command([ common.run_command([
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment