Commit 11eba3d1 authored by Austin Eng's avatar Austin Eng Committed by Commit Bot

Revert "Change blink_web_tests and blink_python_tests test types."

This reverts commit 71c10e67.

Reason for revert: Breaking Dawn's CQ. This CL likely needs to
update webgpu_blink_web_tests as well.

Original change's description:
> Change blink_web_tests and blink_python_tests test types.
>
> This CL changes the GN blink_web_tests and blink_python_tests
> targets to use a new script_test() GN template.
>
> A script_test is a kind of test target that implements the
> [test executable API](//docs/testing/test_executable_api.md)
> via a Python script (rather than being an executable target).
>
> :blink_web_tests, :blink_python_tests are examples of this type
> of test; other targets will be switched over in future CLs as well.
>
> Most importantly, using script_test() will ensure that
> the $root_build_dir/bin/run_$target_name test wrappers are
> generated with all of the appropriate arguments, simplifying the
> invocation of the test both for devs and for the bots.
>
> Bug: 816629
> Change-Id: Ib4bfd2342d762db24cdef75b64ed5dd7fbf3c10e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380936
> Commit-Queue: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Robert Ma <robertma@chromium.org>
> Reviewed-by: Rakib Hasan <rmhasan@google.com>
> Cr-Commit-Position: refs/heads/master@{#812523}

TBR=dpranke@google.com,robertma@chromium.org,rmhasan@google.com

Change-Id: I16c0d8bfaebbeabbeee7dd98a0f4bb083403444f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 816629
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442872Reviewed-by: default avatarAustin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812694}
parent c86f5727
......@@ -1108,6 +1108,9 @@ if (!is_ios) {
}
data = [
"//testing/scripts/common.py",
"//testing/scripts/run_isolated_script_test.py",
"//testing/xvfb.py",
"//third_party/blink/tools/",
"//third_party/blink/web_tests/VirtualTestSuites",
"//third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json",
......@@ -1143,38 +1146,25 @@ 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"
args = [ "@WrappedPath(" +
rebase_path("//third_party/blink/tools/run_web_tests.py",
root_build_dir) + ")" ]
generate_wrapper("blink_web_tests") {
testonly = true
wrapper_script = "${root_build_dir}/bin/run_blink_web_tests"
executable = "//third_party/blink/tools/run_web_tests.py"
executable_args = []
if (is_debug) {
args += [ "--debug" ]
executable_args += [ "--debug" ]
} else {
args += [ "--release" ]
executable_args += [ "--release" ]
}
if (is_android) {
args += [
executable_args += [
"--platform",
"android",
]
}
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",
]
data_deps = [ ":blink_web_tests_support_data" ]
data = [
"//third_party/blink/perf_tests/",
......@@ -1237,15 +1227,14 @@ if (!is_ios) {
deps = [ "//mojo/public/js:bindings_lite" ]
}
script_test("blink_python_tests") {
script = "//testing/scripts/run_isolated_script_test.py"
args = [ "@WrappedPath(" +
rebase_path("//third_party/blink/tools/run_blinkpy_tests.py",
root_build_dir) + ")" ]
group("blink_python_tests") {
data = [
"//build/android/",
"//components/crash/content/tools/generate_breakpad_symbols.py",
"//testing/scripts/common.py",
"//testing/scripts/run_isolated_script_test.py",
"//testing/test_env.py",
"//testing/xvfb.py",
"//third_party/blink/renderer/bindings/scripts/",
"//third_party/blink/renderer/build/scripts/",
"//third_party/blink/tools/",
......
......@@ -92,9 +92,5 @@ template("generate_wrapper") {
"--",
]
args += _wrapped_arguments
if (defined(invoker.write_runtime_deps)) {
write_runtime_deps = invoker.write_runtime_deps
}
}
}
......@@ -245,8 +245,12 @@
"type": "console_test_launcher",
},
"blink_python_tests": {
"args": [
"../../third_party/blink/tools/run_blinkpy_tests.py",
],
"label": "//:blink_python_tests",
"type": "generated_script",
"script": "//testing/scripts/run_isolated_script_test.py",
"type": "script",
},
"blink_tests": {
"label": "//:blink_tests",
......@@ -257,12 +261,23 @@
"type": "console_test_launcher",
},
"blink_web_tests": {
"label": "//: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}",
],
"label": "//:blink_web_tests",
"script": "//testing/scripts/run_isolated_script_test.py",
"type": "script",
},
"boundary_interface_example_apk": {
"label": "//android_webview/support_library/boundary_interfaces:boundary_interface_example_apk",
......
......@@ -24,7 +24,6 @@ if (is_fuchsia) {
if (is_chromeos) {
import("//build/config/chromeos/rules.gni")
import("//build/util/generate_wrapper.gni")
}
if (is_ios) {
......@@ -556,66 +555,6 @@ template("test") {
}
}
# Defines a type of test that invokes a script to run, rather than
# invoking an executable.
#
# The script must implement the
# [test executable API](//docs/testing/test_executable_api.md).
#
# The template must be passed the `script` parameter, which specifies
# the path to the script to run. It may optionally be passed a
# `script_args` parameter, which can be used to include a list of
# args to be specified by default. The template will produce
# a `$root_build_dir/run_$target_name` wrapper and write the runtime_deps
# for the target to $root_build_dir/${target_name}.runtime_deps, as per
# the conventions listed in the
# [test wrapper API](//docs/testing/test_wrapper_api.md).
template("script_test") {
generate_wrapper(target_name) {
testonly = true
wrapper_script = "${root_build_dir}/bin/run_${target_name}"
executable = "//testing/test_env.py"
executable_args =
[ "@WrappedPath(" + rebase_path(invoker.script, root_build_dir) + ")" ]
if (defined(invoker.args)) {
executable_args += invoker.args
}
data = [
"//.vpython",
"//testing/test_env.py",
# These aren't needed by *every* test, but they're likely needed often
# enough to just make it easier to declare them here.
"//testing/xvfb.py",
"//testing/scripts/common.py",
invoker.script,
]
if (defined(invoker.data)) {
data += invoker.data
}
data_deps = []
if (defined(invoker.data_deps)) {
data_deps += invoker.data_deps
}
forward_variables_from(invoker,
[ "*" ],
[
"data",
"data_deps",
"script",
"script_args",
"testonly",
])
write_runtime_deps = "${root_build_dir}/${target_name}.runtime_deps"
}
}
# Test defaults.
set_defaults("test") {
if (is_android) {
......
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