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

[run_wpt_tests.py] Move WPT manifest files gen to after argument parsing

This is mostly a code cleanup; it seemed weird that if you pass '--help'
to the script it would generate the manifest files before showing you
the command line!

Bug: None
Change-Id: I00515216c6883ee38d591993a59bf9d960163b8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412695Reviewed-by: default avatarLuke Z <lpz@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807558}
parent 001a7b81
...@@ -324,6 +324,9 @@ class BaseIsolatedScriptArgsAdapter(object): ...@@ -324,6 +324,9 @@ class BaseIsolatedScriptArgsAdapter(object):
def clean_up_after_test_run(self): def clean_up_after_test_run(self):
pass pass
def do_pre_test_run_tasks(self):
pass
def do_post_test_run_tasks(self): def do_post_test_run_tasks(self):
pass pass
...@@ -331,6 +334,8 @@ class BaseIsolatedScriptArgsAdapter(object): ...@@ -331,6 +334,8 @@ class BaseIsolatedScriptArgsAdapter(object):
self.parse_args() self.parse_args()
cmd = self.generate_isolated_script_cmd() cmd = self.generate_isolated_script_cmd()
self.do_pre_test_run_tasks()
env = os.environ.copy() env = os.environ.copy()
# Assume we want to set up the sandbox environment variables all the # Assume we want to set up the sandbox environment variables all the
......
...@@ -80,19 +80,21 @@ class WPTTestAdapter(wpt_common.BaseWptScriptAdapter): ...@@ -80,19 +80,21 @@ class WPTTestAdapter(wpt_common.BaseWptScriptAdapter):
]) ])
return rest_args return rest_args
def main(): def do_pre_test_run_tasks(self):
# First, generate WPT metadata files. # Generate WPT metadata files.
common.run_command([ common.run_command([
sys.executable, sys.executable,
os.path.join(wpt_common.BLINK_TOOLS_DIR, 'build_wpt_metadata.py'), os.path.join(wpt_common.BLINK_TOOLS_DIR, 'build_wpt_metadata.py'),
"--metadata-output-dir", "--metadata-output-dir",
WPT_METADATA_OUTPUT_DIR, WPT_METADATA_OUTPUT_DIR,
"--additional-expectations", "--additional-expectations",
WPT_OVERRIDE_EXPECTATIONS_PATH, WPT_OVERRIDE_EXPECTATIONS_PATH,
"--checked-in-metadata-dir", "--checked-in-metadata-dir",
WPT_CHECKED_IN_METADATA_DIR WPT_CHECKED_IN_METADATA_DIR
]) ])
def main():
adapter = WPTTestAdapter() adapter = WPTTestAdapter()
return adapter.run_test() return adapter.run_test()
......
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