Commit 0d6ba5c2 authored by Luke Zielinski's avatar Luke Zielinski Committed by Commit Bot

Move wpt-metadata-builder pre-processing step out of a BUILD action and into run_wpt_tests.py.

This will fix the breakage of go/wpt-waterfall and resume running tests.

Bug: 996842
Change-Id: I1df7072de6f344c846cffa044b87ed57e3bdd51b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864563Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Luke Z <lpz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707380}
parent 1315fde1
......@@ -20,6 +20,10 @@ import sys
import common
BLINK_TOOLS_DIR = os.path.join(common.SRC_DIR, 'third_party', 'blink', 'tools')
WPT_METADATA_DIR = "../../wpt_expectations_metadata/"
WPT_OVERRIDE_EXPECTATIONS_PATH = (
"../../third_party/blink/web_tests/WPTOverrideExpectations")
class WPTTestAdapter(common.BaseIsolatedScriptArgsAdapter):
......@@ -55,7 +59,8 @@ class WPTTestAdapter(common.BaseIsolatedScriptArgsAdapter):
"--no-manifest-download",
"--no-pause-after-test",
"--no-fail-on-unexpected",
"--metadata=../../out/Release/wpt_expectations_metadata/",
"--metadata",
WPT_METADATA_DIR,
# By specifying metadata above, WPT will try to find manifest in the
# metadata directory. So here we point it back to the correct path
# for the manifest.
......@@ -80,18 +85,28 @@ class WPTTestAdapter(common.BaseIsolatedScriptArgsAdapter):
def clean_up_after_test_run(self):
common.run_command([
sys.executable,
os.path.join(common.SRC_DIR, 'third_party', 'blink', 'tools',
'update_wpt_output.py'),
os.path.join(BLINK_TOOLS_DIR, 'update_wpt_output.py'),
'--verbose',
'--old-json-output-file-path',
self.options.old_json_output_file_path,
'--new-json-output-dir', self.options.new_json_output_dir,
'--new-json-output-filename', self.options.new_json_output_filename,
'--additional-expectations',
'../../third_party/blink/web_tests/WPTOverrideExpectations',
WPT_OVERRIDE_EXPECTATIONS_PATH
])
def main():
# First, generate WPT metadata files.
common.run_command([
sys.executable,
os.path.join(BLINK_TOOLS_DIR, 'build_wpt_metadata.py'),
"--metadata-output-dir",
WPT_METADATA_DIR,
"--additional-expectations",
WPT_OVERRIDE_EXPECTATIONS_PATH
])
adapter = WPTTestAdapter()
return adapter.run_test()
......
......@@ -2,51 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This action generates WPT metadata files for skipping web tests
action("build_wpt_metadata") {
testonly = true
script = "//third_party/blink/tools/build_wpt_metadata.py"
args = [
"--metadata-output-dir",
rebase_path("$root_out_dir/wpt_expectations_metadata"),
"--additional-expectations",
"../../third_party/blink/web_tests/WPTOverrideExpectations",
]
outputs = [
"$root_out_dir/wpt_expectations_metadata.stamp",
]
data = [
# Include the blinkpy tools to access expectations data
"//third_party/blink/tools/blinkpy/",
]
inputs = [
# Include the various Test Expectations files
"//third_party/blink/web_tests/ASANExpectations",
"//third_party/blink/web_tests/LeakExpectations",
"//third_party/blink/web_tests/MSANExpectations",
"//third_party/blink/web_tests/NeverFixTests",
"//third_party/blink/web_tests/SlowTests",
"//third_party/blink/web_tests/StaleTestExpectations",
"//third_party/blink/web_tests/TestExpectations",
"//third_party/blink/web_tests/VirtualTestSuites",
"//third_party/blink/web_tests/WPTOverrideExpectations",
]
}
# WPT codebase for running webplatform tests
group("wpt_tests_isolate") {
testonly = true
data_deps = [
":build_wpt_metadata",
# Note that we also depend on Chrome and Chromedriver here but specify those
# via the //wpt_tests_isolate target in //src/BUILD.gn
]
data = [
"//testing/scripts/common.py",
"//testing/scripts/run_wpt_tests.py",
"//testing/xvfb.py",
# Include blinkpy tools for post-processing WPT output.
# Include blinkpy tools for setting up expectations.
"//third_party/blink/tools/build_wpt_metadata.py",
"//third_party/blink/tools/update_wpt_output.py",
"//third_party/blink/tools/blinkpy/",
......
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