[gn] Add swarming support for all test targets

This adds corresponding *_run targets for all swarming
isolate actions existing in gyp. This also wires all
targets together under gn_all.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2033813004
Cr-Commit-Position: refs/heads/master@{#36714}
This commit is contained in:
machenbach 2016-06-03 06:46:08 -07:00 committed by Commit bot
parent 63526069c2
commit 976a62acd1
4 changed files with 288 additions and 10 deletions

View File

@ -2065,6 +2065,8 @@ group("gn_all") {
":v8_simple_regexp_fuzzer",
":v8_simple_wasm_fuzzer",
":v8_simple_wasm_asmjs_fuzzer",
"test:gn_all",
"tools:gn_all",
]
if (want_v8_shell) {
@ -2073,11 +2075,9 @@ group("gn_all") {
]
}
if (host_os != "mac" || !is_android) {
# These items don't compile for Android on Mac.
if (v8_test_isolation_mode != "noop") {
deps += [
"test/cctest:cctest",
"test/unittests:unittests",
":d8_run",
]
}
}

View File

@ -17,9 +17,11 @@ template("v8_isolate_run") {
if (name != "" && invoker.isolate != "" && invoker.deps != [] &&
v8_test_isolation_mode != "noop") {
action(name + "_run") {
testonly = true
deps = invoker.deps
script = "tools/isolate_driver.py"
script = "//tools/isolate_driver.py"
sources = [
invoker.isolate,
@ -27,13 +29,20 @@ template("v8_isolate_run") {
inputs = [
# Files that are known to be involved in this step.
"tools/swarming_client/isolate.py",
"tools/swarming_client/run_isolated.py",
"//tools/swarming_client/isolate.py",
"//tools/swarming_client/run_isolated.py",
]
outputs = [
"$root_out_dir/$name.isolated",
]
if (v8_test_isolation_mode == "prepare") {
outputs = [
"$root_out_dir/$name.isolated.gen.json",
]
} else if (v8_test_isolation_mode == "check") {
outputs = [
"$root_out_dir/$name.isolated",
"$root_out_dir/$name.isolated.state",
]
}
# Translate gn to gyp variables.
if (is_asan) {

210
test/BUILD.gn Normal file
View File

@ -0,0 +1,210 @@
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("../gni/isolate.gni")
group("gn_all") {
testonly = true
deps = [
":default_tests",
]
if (host_os != "mac" || !is_android) {
# These items don't compile for Android on Mac.
deps += [
"cctest:cctest",
"unittests:unittests",
]
}
if (v8_test_isolation_mode != "noop") {
deps += [
":bot_default_run",
":benchmarks_run",
":default_run",
":mozilla_run",
":simdjs_run",
":test262_run",
]
}
}
###############################################################################
# Test groups
#
group("default_tests") {
testonly = true
if (v8_test_isolation_mode != "noop") {
deps = [
":cctest_run",
":fuzzer_run",
":intl_run",
":message_run",
":mjsunit_run",
":preparser_run",
":unittests_run",
]
}
}
v8_isolate_run("bot_default") {
deps = [
":default_tests",
":webkit_run",
]
isolate = "bot_default.isolate"
}
v8_isolate_run("default") {
deps = [
":default_tests",
]
isolate = "default.isolate"
}
v8_isolate_run("ignition") {
deps = [
":cctest_run",
":mjsunit_run",
]
isolate = "ignition.isolate"
}
v8_isolate_run("optimize_for_size") {
deps = [
":cctest_run",
":intl_run",
":mjsunit_run",
":webkit_run",
]
isolate = "optimize_for_size.isolate"
}
v8_isolate_run("perf") {
deps = [
":cctest_exe_run",
"..:d8_run",
]
isolate = "perf.isolate"
}
###############################################################################
# Subtests
#
v8_isolate_run("benchmarks") {
deps = [
"..:d8_run",
]
isolate = "benchmarks/benchmarks.isolate"
}
v8_isolate_run("cctest") {
deps = [
":cctest_exe_run",
]
isolate = "cctest/cctest.isolate"
}
v8_isolate_run("cctest_exe") {
deps = [
"cctest:cctest",
]
isolate = "cctest/cctest_exe.isolate"
}
v8_isolate_run("fuzzer") {
deps = [
"..:v8_simple_json_fuzzer",
"..:v8_simple_parser_fuzzer",
"..:v8_simple_regexp_fuzzer",
"..:v8_simple_wasm_fuzzer",
"..:v8_simple_wasm_asmjs_fuzzer",
]
isolate = "fuzzer/fuzzer.isolate"
}
v8_isolate_run("intl") {
deps = [
"..:d8_run",
]
isolate = "intl/intl.isolate"
}
v8_isolate_run("message") {
deps = [
"..:d8_run",
]
isolate = "message/message.isolate"
}
v8_isolate_run("mjsunit") {
deps = [
"..:d8_run",
]
isolate = "mjsunit/mjsunit.isolate"
}
v8_isolate_run("mozilla") {
deps = [
"..:d8_run",
]
isolate = "mozilla/mozilla.isolate"
}
v8_isolate_run("preparser") {
deps = [
"..:d8_run",
]
isolate = "preparser/preparser.isolate"
}
v8_isolate_run("simdjs") {
deps = [
"..:d8_run",
]
isolate = "simdjs/simdjs.isolate"
}
v8_isolate_run("test262") {
deps = [
"..:d8_run",
]
isolate = "test262/test262.isolate"
}
v8_isolate_run("unittests") {
deps = [
"unittests:unittests",
]
isolate = "unittests/unittests.isolate"
}
v8_isolate_run("webkit") {
deps = [
"..:d8_run",
]
isolate = "webkit/webkit.isolate"
}

59
tools/BUILD.gn Normal file
View File

@ -0,0 +1,59 @@
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("../gni/isolate.gni")
group("gn_all") {
testonly = true
if (v8_test_isolation_mode != "noop") {
deps = [
":check_static_initializers_run",
":jsfunfuzz_run",
":run_deopt_fuzzer_run",
":run_gcmole_run",
":run_valgrind_run",
]
}
}
v8_isolate_run("check_static_initializers") {
deps = [
"..:d8_run",
]
isolate = "check-static-initializers.isolate"
}
v8_isolate_run("jsfunfuzz") {
deps = [
"..:d8_run",
]
isolate = "jsfunfuzz/jsfunfuzz.isolate"
}
v8_isolate_run("run_deopt_fuzzer") {
deps = [
"..:d8_run",
]
isolate = "run-deopt-fuzzer.isolate"
}
v8_isolate_run("run_gcmole") {
deps = [
"..:d8_run",
]
isolate = "gcmole/run-gcmole.isolate"
}
v8_isolate_run("run_valgrind") {
deps = [
"..:d8_run",
]
isolate = "run-valgrind.isolate"
}