Commit 3195f19e authored by machenbach's avatar machenbach Committed by Commit bot

[inspector] Add swarming support to inspector tests

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2393863002
Cr-Commit-Position: refs/heads/master@{#40194}
parent f994fcb1
...@@ -724,6 +724,7 @@ action("v8_dump_build_config") { ...@@ -724,6 +724,7 @@ action("v8_dump_build_config") {
"is_tsan=$is_tsan", "is_tsan=$is_tsan",
"target_cpu=\"$target_cpu\"", "target_cpu=\"$target_cpu\"",
"v8_enable_i18n_support=$v8_enable_i18n_support", "v8_enable_i18n_support=$v8_enable_i18n_support",
"v8_enable_inspector=$v8_enable_inspector_override",
"v8_target_cpu=\"$v8_target_cpu\"", "v8_target_cpu=\"$v8_target_cpu\"",
"v8_use_snapshot=$v8_use_snapshot", "v8_use_snapshot=$v8_use_snapshot",
] ]
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/sanitizers/sanitizers.gni") import("//build/config/sanitizers/sanitizers.gni")
import("//build_overrides/v8.gni")
import("//third_party/icu/config.gni") import("//third_party/icu/config.gni")
import("v8.gni") import("v8.gni")
...@@ -12,11 +13,21 @@ declare_args() { ...@@ -12,11 +13,21 @@ declare_args() {
} }
template("v8_isolate_run") { template("v8_isolate_run") {
forward_variables_from(invoker,
"*",
[
"deps",
"isolate",
])
# Remember target name as within the action scope the target name will be # Remember target name as within the action scope the target name will be
# different. # different.
name = target_name 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") { action(name + "_run") {
testonly = true testonly = true
...@@ -86,6 +97,11 @@ template("v8_isolate_run") { ...@@ -86,6 +97,11 @@ template("v8_isolate_run") {
} else { } else {
icu_use_data_file_flag = "0" icu_use_data_file_flag = "0"
} }
if (v8_enable_inspector_override) {
enable_inspector = "1"
} else {
enable_inspector = "0"
}
if (v8_use_external_startup_data) { if (v8_use_external_startup_data) {
use_external_startup_data = "1" use_external_startup_data = "1"
} else { } else {
...@@ -107,7 +123,6 @@ template("v8_isolate_run") { ...@@ -107,7 +123,6 @@ template("v8_isolate_run") {
gcmole = "0" gcmole = "0"
} }
# Note, all paths will be rebased in isolate_driver.py to be relative to # Note, all paths will be rebased in isolate_driver.py to be relative to
# the isolate file. # the isolate file.
args = [ args = [
...@@ -142,6 +157,8 @@ template("v8_isolate_run") { ...@@ -142,6 +157,8 @@ template("v8_isolate_run") {
"--config-variable", "--config-variable",
"icu_use_data_file_flag=$icu_use_data_file_flag", "icu_use_data_file_flag=$icu_use_data_file_flag",
"--config-variable", "--config-variable",
"is_gn=1",
"--config-variable",
"msan=$msan", "msan=$msan",
"--config-variable", "--config-variable",
"tsan=$tsan", "tsan=$tsan",
...@@ -154,6 +171,8 @@ template("v8_isolate_run") { ...@@ -154,6 +171,8 @@ template("v8_isolate_run") {
"--config-variable", "--config-variable",
"target_arch=$target_arch", "target_arch=$target_arch",
"--config-variable", "--config-variable",
"v8_enable_inspector=$enable_inspector",
"--config-variable",
"v8_use_external_startup_data=$use_external_startup_data", "v8_use_external_startup_data=$use_external_startup_data",
"--config-variable", "--config-variable",
"v8_use_snapshot=$use_snapshot", "v8_use_snapshot=$use_snapshot",
......
...@@ -74,12 +74,14 @@ ...@@ -74,12 +74,14 @@
'--config-variable', 'gcmole=<(gcmole)', '--config-variable', 'gcmole=<(gcmole)',
'--config-variable', 'has_valgrind=<(has_valgrind)', '--config-variable', 'has_valgrind=<(has_valgrind)',
'--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)', '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
'--config-variable', 'is_gn=0',
'--config-variable', 'msan=<(msan)', '--config-variable', 'msan=<(msan)',
'--config-variable', 'tsan=<(tsan)', '--config-variable', 'tsan=<(tsan)',
'--config-variable', 'coverage=<(coverage)', '--config-variable', 'coverage=<(coverage)',
'--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)', '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)',
'--config-variable', 'component=<(component)', '--config-variable', 'component=<(component)',
'--config-variable', 'target_arch=<(target_arch)', '--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_external_startup_data=<(v8_use_external_startup_data)',
'--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)', '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)',
], ],
......
...@@ -317,7 +317,8 @@ ...@@ -317,7 +317,8 @@
'gn_debug_x86_minimal_symbols': [ 'gn_debug_x86_minimal_symbols': [
'gn', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'], 'gn', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'],
'gn_debug_x86_no_i18n': [ '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_x86_no_snap': [
'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'],
'gn_debug_x86_no_snap_trybot': [ 'gn_debug_x86_no_snap_trybot': [
...@@ -339,7 +340,8 @@ ...@@ -339,7 +340,8 @@
'gn_release_x86_minimal_symbols': [ 'gn_release_x86_minimal_symbols': [
'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], 'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'],
'gn_release_x86_no_i18n_trybot': [ '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_x86_no_snap': [
'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'],
'gn_release_x86_no_snap_shared_minimal_symbols': [ 'gn_release_x86_no_snap_shared_minimal_symbols': [
...@@ -620,6 +622,11 @@ ...@@ -620,6 +622,11 @@
'gyp_defines': 'v8_enable_i18n_support=0 icu_use_data_file_flag=0', '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': { 'v8_enable_disassembler': {
'gn_args': 'v8_enable_disassembler=true', 'gn_args': 'v8_enable_disassembler=true',
'gyp_defines': 'v8_enable_disassembler=1', 'gyp_defines': 'v8_enable_disassembler=1',
......
...@@ -60,6 +60,7 @@ group("default_tests") { ...@@ -60,6 +60,7 @@ group("default_tests") {
v8_isolate_run("bot_default") { v8_isolate_run("bot_default") {
deps = [ deps = [
":default_tests", ":default_tests",
":inspector-test_run",
":webkit_run", ":webkit_run",
] ]
...@@ -77,6 +78,7 @@ v8_isolate_run("default") { ...@@ -77,6 +78,7 @@ v8_isolate_run("default") {
v8_isolate_run("optimize_for_size") { v8_isolate_run("optimize_for_size") {
deps = [ deps = [
":cctest_run", ":cctest_run",
":inspector-test_run",
":intl_run", ":intl_run",
":mjsunit_run", ":mjsunit_run",
":webkit_run", ":webkit_run",
...@@ -134,6 +136,15 @@ v8_isolate_run("fuzzer") { ...@@ -134,6 +136,15 @@ v8_isolate_run("fuzzer") {
isolate = "fuzzer/fuzzer.isolate" 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") { v8_isolate_run("intl") {
deps = [ deps = [
"..:d8_run", "..:d8_run",
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
'includes': [ 'includes': [
'cctest/cctest.isolate', 'cctest/cctest.isolate',
'fuzzer/fuzzer.isolate', 'fuzzer/fuzzer.isolate',
'inspector/inspector.isolate',
'intl/intl.isolate', 'intl/intl.isolate',
'message/message.isolate', 'message/message.isolate',
'mjsunit/mjsunit.isolate', 'mjsunit/mjsunit.isolate',
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
# found in the LICENSE file. # found in the LICENSE file.
import("../../gni/v8.gni") import("../../gni/v8.gni")
import("//build_overrides/v8.gni")
v8_executable("inspector-test") { if (v8_enable_inspector_override) {
v8_executable("inspector-test") {
testonly = true testonly = true
sources = [ sources = [
...@@ -36,4 +38,5 @@ v8_executable("inspector-test") { ...@@ -36,4 +38,5 @@ v8_executable("inspector-test") {
cflags = [] cflags = []
ldflags = [] ldflags = []
}
} }
...@@ -36,4 +36,23 @@ ...@@ -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',
],
},
],
}],
],
} }
# 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',
],
}
\ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
}, },
'includes': [ 'includes': [
'cctest/cctest.isolate', 'cctest/cctest.isolate',
'inspector/inspector.isolate',
'intl/intl.isolate', 'intl/intl.isolate',
'mjsunit/mjsunit.isolate', 'mjsunit/mjsunit.isolate',
'webkit/webkit.isolate', 'webkit/webkit.isolate',
......
...@@ -68,6 +68,7 @@ TEST_MAP = { ...@@ -68,6 +68,7 @@ TEST_MAP = {
"mjsunit", "mjsunit",
"cctest", "cctest",
"webkit", "webkit",
"inspector",
"fuzzer", "fuzzer",
"message", "message",
"preparser", "preparser",
...@@ -89,6 +90,7 @@ TEST_MAP = { ...@@ -89,6 +90,7 @@ TEST_MAP = {
"mjsunit", "mjsunit",
"cctest", "cctest",
"webkit", "webkit",
"inspector",
"intl", "intl",
], ],
"unittests": [ "unittests": [
...@@ -255,6 +257,9 @@ def BuildOptions(): ...@@ -255,6 +257,9 @@ def BuildOptions():
result.add_option("--download-data-only", result.add_option("--download-data-only",
help="Deprecated", help="Deprecated",
default=False, action="store_true") 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", result.add_option("--extra-flags",
help="Additional flags to pass to each test command", help="Additional flags to pass to each test command",
default="") default="")
...@@ -466,6 +471,7 @@ def ProcessOptions(options): ...@@ -466,6 +471,7 @@ def ProcessOptions(options):
options.arch = 'ia32' options.arch = 'ia32'
options.asan = build_config["is_asan"] options.asan = build_config["is_asan"]
options.dcheck_always_on = build_config["dcheck_always_on"] 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.mode = 'debug' if build_config["is_debug"] else 'release'
options.msan = build_config["is_msan"] options.msan = build_config["is_msan"]
options.no_i18n = not build_config["v8_enable_i18n_support"] options.no_i18n = not build_config["v8_enable_i18n_support"]
...@@ -592,6 +598,9 @@ def ProcessOptions(options): ...@@ -592,6 +598,9 @@ def ProcessOptions(options):
if options.no_i18n: if options.no_i18n:
TEST_MAP["bot_default"].remove("intl") TEST_MAP["bot_default"].remove("intl")
TEST_MAP["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 return True
......
...@@ -20,5 +20,12 @@ ...@@ -20,5 +20,12 @@
], ],
}, },
}], }],
['is_gn==1', {
'variables': {
'files': [
'<(PRODUCT_DIR)/v8_build_config.json',
],
},
}],
], ],
} }
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