[inspector] Add swarming support to inspector tests

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2393863002
Cr-Commit-Position: refs/heads/master@{#40194}
This commit is contained in:
machenbach 2016-10-12 00:31:53 -07:00 committed by Commit bot
parent f994fcb10e
commit 3195f19e87
12 changed files with 143 additions and 32 deletions

View File

@ -724,6 +724,7 @@ action("v8_dump_build_config") {
"is_tsan=$is_tsan",
"target_cpu=\"$target_cpu\"",
"v8_enable_i18n_support=$v8_enable_i18n_support",
"v8_enable_inspector=$v8_enable_inspector_override",
"v8_target_cpu=\"$v8_target_cpu\"",
"v8_use_snapshot=$v8_use_snapshot",
]

View File

@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/sanitizers/sanitizers.gni")
import("//build_overrides/v8.gni")
import("//third_party/icu/config.gni")
import("v8.gni")
@ -12,11 +13,21 @@ declare_args() {
}
template("v8_isolate_run") {
forward_variables_from(invoker,
"*",
[
"deps",
"isolate",
])
# Remember target name as within the action scope the target name will be
# different.
name = target_name
if (name != "" && invoker.isolate != "" && invoker.deps != [] &&
v8_test_isolation_mode != "noop") {
assert(defined(invoker.deps))
assert(defined(invoker.isolate))
if (name != "" && v8_test_isolation_mode != "noop") {
action(name + "_run") {
testonly = true
@ -86,6 +97,11 @@ template("v8_isolate_run") {
} else {
icu_use_data_file_flag = "0"
}
if (v8_enable_inspector_override) {
enable_inspector = "1"
} else {
enable_inspector = "0"
}
if (v8_use_external_startup_data) {
use_external_startup_data = "1"
} else {
@ -107,7 +123,6 @@ template("v8_isolate_run") {
gcmole = "0"
}
# Note, all paths will be rebased in isolate_driver.py to be relative to
# the isolate file.
args = [
@ -142,6 +157,8 @@ template("v8_isolate_run") {
"--config-variable",
"icu_use_data_file_flag=$icu_use_data_file_flag",
"--config-variable",
"is_gn=1",
"--config-variable",
"msan=$msan",
"--config-variable",
"tsan=$tsan",
@ -154,6 +171,8 @@ template("v8_isolate_run") {
"--config-variable",
"target_arch=$target_arch",
"--config-variable",
"v8_enable_inspector=$enable_inspector",
"--config-variable",
"v8_use_external_startup_data=$use_external_startup_data",
"--config-variable",
"v8_use_snapshot=$use_snapshot",

View File

@ -74,12 +74,14 @@
'--config-variable', 'gcmole=<(gcmole)',
'--config-variable', 'has_valgrind=<(has_valgrind)',
'--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
'--config-variable', 'is_gn=0',
'--config-variable', 'msan=<(msan)',
'--config-variable', 'tsan=<(tsan)',
'--config-variable', 'coverage=<(coverage)',
'--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)',
'--config-variable', 'component=<(component)',
'--config-variable', 'target_arch=<(target_arch)',
'--config-variable', 'v8_enable_inspector=<(v8_enable_inspector)',
'--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)',
'--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)',
],

View File

@ -317,7 +317,8 @@
'gn_debug_x86_minimal_symbols': [
'gn', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'],
'gn_debug_x86_no_i18n': [
'gn', 'debug_bot', 'x86', 'v8_no_i18n'],
'gn', 'debug_bot', 'x86', 'swarming', 'v8_disable_inspector',
'v8_no_i18n'],
'gn_debug_x86_no_snap': [
'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'],
'gn_debug_x86_no_snap_trybot': [
@ -339,7 +340,8 @@
'gn_release_x86_minimal_symbols': [
'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'],
'gn_release_x86_no_i18n_trybot': [
'gn', 'release_trybot', 'x86', 'swarming', 'v8_no_i18n'],
'gn', 'release_trybot', 'x86', 'swarming', 'v8_disable_inspector',
'v8_no_i18n'],
'gn_release_x86_no_snap': [
'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'],
'gn_release_x86_no_snap_shared_minimal_symbols': [
@ -620,6 +622,11 @@
'gyp_defines': 'v8_enable_i18n_support=0 icu_use_data_file_flag=0',
},
'v8_disable_inspector': {
'gn_args': 'v8_enable_inspector=false',
'gyp_defines': 'v8_enable_inspector=0 ',
},
'v8_enable_disassembler': {
'gn_args': 'v8_enable_disassembler=true',
'gyp_defines': 'v8_enable_disassembler=1',

View File

@ -60,6 +60,7 @@ group("default_tests") {
v8_isolate_run("bot_default") {
deps = [
":default_tests",
":inspector-test_run",
":webkit_run",
]
@ -77,6 +78,7 @@ v8_isolate_run("default") {
v8_isolate_run("optimize_for_size") {
deps = [
":cctest_run",
":inspector-test_run",
":intl_run",
":mjsunit_run",
":webkit_run",
@ -134,6 +136,15 @@ v8_isolate_run("fuzzer") {
isolate = "fuzzer/fuzzer.isolate"
}
v8_isolate_run("inspector-test") {
deps = []
if (v8_enable_inspector_override) {
deps += [ "inspector:inspector-test" ]
}
isolate = "inspector/inspector.isolate"
}
v8_isolate_run("intl") {
deps = [
"..:d8_run",

View File

@ -10,6 +10,7 @@
'includes': [
'cctest/cctest.isolate',
'fuzzer/fuzzer.isolate',
'inspector/inspector.isolate',
'intl/intl.isolate',
'message/message.isolate',
'mjsunit/mjsunit.isolate',

View File

@ -3,37 +3,40 @@
# found in the LICENSE file.
import("../../gni/v8.gni")
import("//build_overrides/v8.gni")
v8_executable("inspector-test") {
testonly = true
if (v8_enable_inspector_override) {
v8_executable("inspector-test") {
testonly = true
sources = [
"inspector-impl.cc",
"inspector-impl.h",
"inspector-test.cc",
"task-runner.cc",
"task-runner.h",
]
sources = [
"inspector-impl.cc",
"inspector-impl.h",
"inspector-test.cc",
"task-runner.cc",
"task-runner.h",
]
configs = [
"../..:external_config",
"../..:internal_config_base",
]
configs = [
"../..:external_config",
"../..:internal_config_base",
]
deps = [
"../..:v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
]
deps = [
"../..:v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
]
if (is_component_build) {
# inspector-test can't be built against a shared library, so we
# need to depend on the underlying static target in that case.
deps += [ "../..:v8_maybe_snapshot" ]
} else {
deps += [ "../..:v8" ]
if (is_component_build) {
# inspector-test can't be built against a shared library, so we
# need to depend on the underlying static target in that case.
deps += [ "../..:v8_maybe_snapshot" ]
} else {
deps += [ "../..:v8" ]
}
cflags = []
ldflags = []
}
cflags = []
ldflags = []
}

View File

@ -36,4 +36,23 @@
],
},
],
'conditions': [
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'inspector-test_run',
'type': 'none',
'dependencies': [
'inspector-test',
],
'includes': [
'../../gypfiles/isolate.gypi',
],
'sources': [
'inspector.isolate',
],
},
],
}],
],
}

View File

@ -0,0 +1,31 @@
# 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.
{
'variables': {
'files': [
'./console/',
'./cpu-profiler/',
'./debugger/',
'./inspector.status',
'./json-parse-expected.txt',
'./json-parse.js',
'./protocol-test.js',
'./runtime/',
'./testcfg.py',
],
},
'conditions': [
['v8_enable_inspector==1', {
'variables': {
'files': [
'<(PRODUCT_DIR)/inspector-test<(EXECUTABLE_SUFFIX)',
],
},
}],
],
'includes': [
'../../src/base.isolate',
'../../tools/testrunner/testrunner.isolate',
],
}

View File

@ -9,6 +9,7 @@
},
'includes': [
'cctest/cctest.isolate',
'inspector/inspector.isolate',
'intl/intl.isolate',
'mjsunit/mjsunit.isolate',
'webkit/webkit.isolate',

View File

@ -68,6 +68,7 @@ TEST_MAP = {
"mjsunit",
"cctest",
"webkit",
"inspector",
"fuzzer",
"message",
"preparser",
@ -89,6 +90,7 @@ TEST_MAP = {
"mjsunit",
"cctest",
"webkit",
"inspector",
"intl",
],
"unittests": [
@ -255,6 +257,9 @@ def BuildOptions():
result.add_option("--download-data-only",
help="Deprecated",
default=False, action="store_true")
result.add_option("--enable-inspector",
help="Indicates a build with inspector support",
default=False, action="store_true")
result.add_option("--extra-flags",
help="Additional flags to pass to each test command",
default="")
@ -466,6 +471,7 @@ def ProcessOptions(options):
options.arch = 'ia32'
options.asan = build_config["is_asan"]
options.dcheck_always_on = build_config["dcheck_always_on"]
options.enable_inspector = build_config["v8_enable_inspector"]
options.mode = 'debug' if build_config["is_debug"] else 'release'
options.msan = build_config["is_msan"]
options.no_i18n = not build_config["v8_enable_i18n_support"]
@ -592,6 +598,9 @@ def ProcessOptions(options):
if options.no_i18n:
TEST_MAP["bot_default"].remove("intl")
TEST_MAP["default"].remove("intl")
if not options.enable_inspector:
TEST_MAP["bot_default"].remove("inspector")
TEST_MAP["optimize_for_size"].remove("inspector")
return True

View File

@ -20,5 +20,12 @@
],
},
}],
['is_gn==1', {
'variables': {
'files': [
'<(PRODUCT_DIR)/v8_build_config.json',
],
},
}],
],
}