Commit 67bc5a9d authored by Dirk Pranke's avatar Dirk Pranke Committed by Commit Bot

Refactor devtools_web_tests, webgpu_blink_web_tests targets.

This converts the two test suites from 'script' tests to
'generated_script' tests, pushing more of the command line logic
into GN targets (and the generated wrapper scripts).

Bug: 816629
Change-Id: I0ebca0c54d61c6c60734147ebfef1673bd262ed7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462623Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#815648}
parent 5adb2687
......@@ -1039,13 +1039,6 @@ if (!is_ios) {
}
}
group("devtools_web_tests") {
testonly = true
deps = [ ":blink_web_tests" ]
data_deps = [ ":blink_web_tests" ]
data = [ "//third_party/devtools-frontend/src/test/webtests/" ]
}
group("blink_web_tests_support_data") {
testonly = true
data_deps = [
......@@ -1145,38 +1138,41 @@ if (!is_ios) {
}
}
# https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_tests.md
script_test("blink_web_tests") {
script = "//testing/scripts/run_isolated_script_test.py"
_common_web_test_script = "//testing/scripts/run_isolated_script_test.py"
args = [ "@WrappedPath(" +
rebase_path("//third_party/blink/tools/run_web_tests.py",
root_build_dir) + ")" ]
_common_web_test_args = [ "@WrappedPath(" + rebase_path(
"//third_party/blink/tools/run_web_tests.py",
root_build_dir) + ")" ]
if (is_debug) {
_common_web_test_args += [ "--debug" ]
} else {
_common_web_test_args += [ "--release" ]
}
if (is_debug) {
args += [ "--debug" ]
} else {
args += [ "--release" ]
}
if (is_android) {
_common_web_test_args += [
"--platform",
"android",
]
}
if (is_android) {
args += [
"--platform",
"android",
]
}
_common_web_test_args += [
"--seed",
"4",
"--no-show-results",
"--zero-tests-executed-ok",
"--clobber-old-results",
"--exit-after-n-failures",
"5000",
"--exit-after-n-crashes-or-timeouts",
"100",
]
args += [
"--seed",
"4",
"--no-show-results",
"--zero-tests-executed-ok",
"--clobber-old-results",
"--exit-after-n-failures",
"5000",
"--exit-after-n-crashes-or-timeouts",
"100",
]
# https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_tests.md
script_test("blink_web_tests") {
script = _common_web_test_script
args = _common_web_test_args
data_deps = [ ":blink_web_tests_support_data" ]
data = [
......@@ -1185,30 +1181,37 @@ if (!is_ios) {
]
}
generate_wrapper("webgpu_blink_web_tests") {
testonly = true
wrapper_script = "${root_build_dir}/bin/run_webgpu_blink_web_tests"
executable = "//third_party/blink/tools/run_web_tests.py"
executable_args = [
"--additional-driver-flag=--enable-unsafe-webgpu",
"--ignore-default-expectations",
"--additional-expectations",
"@WrappedPath(../../third_party/blink/web_tests/WebGPUExpectations)",
"--isolated-script-test-filter=wpt_internal/webgpu/*",
]
script_test("devtools_web_tests") {
# This target differs from :blink_web_tests in that it uses the
# same test harness but runs an entirely different set of tests
# and doesn't have a dependency on the web_test directory at all.
script = _common_web_test_script
if (is_debug) {
executable_args += [ "--debug" ]
} else {
executable_args += [ "--release" ]
}
args = _common_web_test_args + [
"--layout-test-directory=@WrappedPath(" + rebase_path(
"//third_party/devtools-frontend/src/test/webtests",
root_out_dir) + ")",
"http/tests/devtools",
]
if (is_android) {
executable_args += [
"--platform",
"android",
]
}
data_deps = [ ":blink_web_tests_support_data" ]
data = [ "//third_party/devtools-frontend/src/test/webtests/" ]
}
script_test("webgpu_blink_web_tests") {
# This target differs from :blink_web_tests in that it uses the same
# test harness and a few additional flags but, more importantly, only runs
# the web_tests/wpt_internal/webgpu tests, so it doesn't have a data
# dependency on the whole web_test directory.
script = _common_web_test_script
args =
_common_web_test_args + [
"--additional-driver-flag=--enable-unsafe-webgpu",
"--ignore-default-expectations",
"--additional-expectations",
"@WrappedPath(../../third_party/blink/web_tests/WebGPUExpectations)",
"--isolated-script-test-filter=wpt_internal/webgpu/*",
]
data_deps = [ ":blink_web_tests_support_data" ]
data = [
......
......@@ -269,23 +269,12 @@
"type": "additional_compile_target",
},
"devtools_web_tests": {
"label": "//:devtools_web_tests",
"type": "generated_script",
"args": [
"../../third_party/blink/tools/run_web_tests.py",
"--seed",
"4",
"--no-show-results",
"--zero-tests-executed-ok",
"--clobber-old-results",
"--exit-after-n-failures",
"5000",
"--exit-after-n-crashes-or-timeouts",
"100",
"--results-directory",
"${ISOLATED_OUTDIR}",
],
"label": "//:devtools_web_tests",
"script": "//testing/scripts/run_isolated_script_test.py",
"type": "script",
},
"boringssl_crypto_tests": {
"label": "//third_party/boringssl:boringssl_crypto_tests",
......@@ -1854,28 +1843,12 @@
"type": "junit_test",
},
"webgpu_blink_web_tests": {
"label": "//:webgpu_blink_web_tests",
"type": "generated_script",
"args": [
"../../third_party/blink/tools/run_web_tests.py",
"--seed",
"4",
"--no-show-results",
"--zero-tests-executed-ok",
"--clobber-old-results",
"--exit-after-n-failures",
"5000",
"--exit-after-n-crashes-or-timeouts",
"100",
"--results-directory",
"${ISOLATED_OUTDIR}",
# WebGPU specific
"--additional-driver-flag=--enable-unsafe-webgpu",
"--ignore-default-expectations",
"--additional-expectations=../../third_party/blink/web_tests/WebGPUExpectations",
"--isolated-script-test-filter=wpt_internal/webgpu/*",
],
"label": "//:webgpu_blink_web_tests",
"script": "//testing/scripts/run_isolated_script_test.py",
"type": "script",
},
"weblayer_browsertests": {
"label": "//weblayer/test:weblayer_browsertests",
......
......@@ -1250,6 +1250,7 @@
}
},
'webkit_layout_from_devtools': {
# TODO(crbug.com/816629) - Move these args into //BUILD.gn .
# layout test failures are retried 3 times when '--test-list' is not
# passed, but 0 times when '--test-list' is passed. We want to always
# retry 3 times, so we explicitly specify it.
......@@ -3121,6 +3122,7 @@
'gpu_webgpu_integration_extra_isolated_scripts': {
'webgpu_blink_web_tests_with_backend_validation': {
# TODO(crbug.com/816629) - Move these args into //BUILD.gn.
'name': 'webgpu_blink_web_tests_with_backend_validation',
'args': [
'--driver-logging',
......@@ -3161,6 +3163,7 @@
'gpu_webgpu_integration_isolated_scripts': {
'webgpu_blink_web_tests': {
# TODO(crbug.com/816629) - Move these args into //BUILD.gn.
'name': 'webgpu_blink_web_tests',
'args': [
'--driver-logging',
......
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