[gn] Add fuzzer targets.
This adds the v8-side fuzzer executables for smoke testing. This also renames the old gyp targets to stay consistent with chromium. Naming convention for type X after the rename: library: X_fuzzer (gn), X_fuzzer_lib (gyp) executable v8: v8_simple_X_fuzzer executable chromium: v8_X_fuzzer BUG=chromium:474921 Review-Url: https://codereview.chromium.org/2032363002 Cr-Commit-Position: refs/heads/master@{#36713}
This commit is contained in:
parent
39442cf714
commit
63526069c2
36
BUILD.gn
36
BUILD.gn
@ -2007,6 +2007,14 @@ v8_source_set("fuzzer_support") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8_source_set("simple_fuzzer") {
|
||||||
|
sources = [
|
||||||
|
"test/fuzzer/fuzzer.cc",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs = [ ":internal_config_base" ]
|
||||||
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Executables
|
# Executables
|
||||||
#
|
#
|
||||||
@ -2052,6 +2060,11 @@ group("gn_all") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":d8",
|
":d8",
|
||||||
|
":v8_simple_json_fuzzer",
|
||||||
|
":v8_simple_parser_fuzzer",
|
||||||
|
":v8_simple_regexp_fuzzer",
|
||||||
|
":v8_simple_wasm_fuzzer",
|
||||||
|
":v8_simple_wasm_asmjs_fuzzer",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (want_v8_shell) {
|
if (want_v8_shell) {
|
||||||
@ -2179,6 +2192,19 @@ if (want_v8_shell) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template("v8_fuzzer") {
|
||||||
|
name = target_name
|
||||||
|
forward_variables_from(invoker, "*")
|
||||||
|
executable("v8_simple_" + name) {
|
||||||
|
deps = [
|
||||||
|
":" + name,
|
||||||
|
":simple_fuzzer",
|
||||||
|
]
|
||||||
|
|
||||||
|
configs += [ ":external_config" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
v8_source_set("json_fuzzer") {
|
v8_source_set("json_fuzzer") {
|
||||||
sources = [
|
sources = [
|
||||||
"test/fuzzer/json.cc",
|
"test/fuzzer/json.cc",
|
||||||
@ -2191,6 +2217,8 @@ v8_source_set("json_fuzzer") {
|
|||||||
configs = [ ":internal_config" ]
|
configs = [ ":internal_config" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8_fuzzer("json_fuzzer") {}
|
||||||
|
|
||||||
v8_source_set("parser_fuzzer") {
|
v8_source_set("parser_fuzzer") {
|
||||||
sources = [
|
sources = [
|
||||||
"test/fuzzer/parser.cc",
|
"test/fuzzer/parser.cc",
|
||||||
@ -2203,6 +2231,8 @@ v8_source_set("parser_fuzzer") {
|
|||||||
configs = [ ":internal_config" ]
|
configs = [ ":internal_config" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8_fuzzer("parser_fuzzer") {}
|
||||||
|
|
||||||
v8_source_set("regexp_fuzzer") {
|
v8_source_set("regexp_fuzzer") {
|
||||||
sources = [
|
sources = [
|
||||||
"test/fuzzer/regexp.cc",
|
"test/fuzzer/regexp.cc",
|
||||||
@ -2215,6 +2245,8 @@ v8_source_set("regexp_fuzzer") {
|
|||||||
configs = [ ":internal_config" ]
|
configs = [ ":internal_config" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8_fuzzer("regexp_fuzzer") {}
|
||||||
|
|
||||||
v8_source_set("wasm_fuzzer") {
|
v8_source_set("wasm_fuzzer") {
|
||||||
sources = [
|
sources = [
|
||||||
"test/fuzzer/wasm.cc",
|
"test/fuzzer/wasm.cc",
|
||||||
@ -2227,6 +2259,8 @@ v8_source_set("wasm_fuzzer") {
|
|||||||
configs = [ ":internal_config" ]
|
configs = [ ":internal_config" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8_fuzzer("wasm_fuzzer") {}
|
||||||
|
|
||||||
v8_source_set("wasm_asmjs_fuzzer") {
|
v8_source_set("wasm_asmjs_fuzzer") {
|
||||||
sources = [
|
sources = [
|
||||||
"test/fuzzer/wasm-asmjs.cc",
|
"test/fuzzer/wasm-asmjs.cc",
|
||||||
@ -2238,3 +2272,5 @@ v8_source_set("wasm_asmjs_fuzzer") {
|
|||||||
|
|
||||||
configs = [ ":internal_config" ]
|
configs = [ ":internal_config" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v8_fuzzer("wasm_asmjs_fuzzer") {}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
|
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'json_fuzzer',
|
'target_name': 'v8_simple_json_fuzzer',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'json_fuzzer_lib',
|
'json_fuzzer_lib',
|
||||||
@ -35,7 +35,7 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'parser_fuzzer',
|
'target_name': 'v8_simple_parser_fuzzer',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'parser_fuzzer_lib',
|
'parser_fuzzer_lib',
|
||||||
@ -61,7 +61,7 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'regexp_fuzzer',
|
'target_name': 'v8_simple_regexp_fuzzer',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'regexp_fuzzer_lib',
|
'regexp_fuzzer_lib',
|
||||||
@ -87,7 +87,7 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'wasm_fuzzer',
|
'target_name': 'v8_simple_wasm_fuzzer',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'wasm_fuzzer_lib',
|
'wasm_fuzzer_lib',
|
||||||
@ -113,7 +113,7 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'wasm_asmjs_fuzzer',
|
'target_name': 'v8_simple_wasm_asmjs_fuzzer',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'wasm_asmjs_fuzzer_lib',
|
'wasm_asmjs_fuzzer_lib',
|
||||||
@ -169,9 +169,11 @@
|
|||||||
'target_name': 'fuzzer_run',
|
'target_name': 'fuzzer_run',
|
||||||
'type': 'none',
|
'type': 'none',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'json_fuzzer',
|
'v8_simple_json_fuzzer',
|
||||||
'parser_fuzzer',
|
'v8_simple_parser_fuzzer',
|
||||||
'regexp_fuzzer',
|
'v8_simple_regexp_fuzzer',
|
||||||
|
'v8_simple_wasm_fuzzer',
|
||||||
|
'v8_simple_wasm_asmjs_fuzzer',
|
||||||
],
|
],
|
||||||
'includes': [
|
'includes': [
|
||||||
'../../gypfiles/isolate.gypi',
|
'../../gypfiles/isolate.gypi',
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
{
|
{
|
||||||
'variables': {
|
'variables': {
|
||||||
'files': [
|
'files': [
|
||||||
'<(PRODUCT_DIR)/json_fuzzer<(EXECUTABLE_SUFFIX)',
|
'<(PRODUCT_DIR)/v8_simple_json_fuzzer<(EXECUTABLE_SUFFIX)',
|
||||||
'<(PRODUCT_DIR)/parser_fuzzer<(EXECUTABLE_SUFFIX)',
|
'<(PRODUCT_DIR)/v8_simple_parser_fuzzer<(EXECUTABLE_SUFFIX)',
|
||||||
'<(PRODUCT_DIR)/regexp_fuzzer<(EXECUTABLE_SUFFIX)',
|
'<(PRODUCT_DIR)/v8_simple_regexp_fuzzer<(EXECUTABLE_SUFFIX)',
|
||||||
'<(PRODUCT_DIR)/wasm_fuzzer<(EXECUTABLE_SUFFIX)',
|
'<(PRODUCT_DIR)/v8_simple_wasm_fuzzer<(EXECUTABLE_SUFFIX)',
|
||||||
'<(PRODUCT_DIR)/wasm_asmjs_fuzzer<(EXECUTABLE_SUFFIX)',
|
'<(PRODUCT_DIR)/v8_simple_wasm_asmjs_fuzzer<(EXECUTABLE_SUFFIX)',
|
||||||
'./fuzzer.status',
|
'./fuzzer.status',
|
||||||
'./testcfg.py',
|
'./testcfg.py',
|
||||||
'./json/',
|
'./json/',
|
||||||
|
@ -26,7 +26,7 @@ class FuzzerTestSuite(testsuite.TestSuite):
|
|||||||
def ListTests(self, context):
|
def ListTests(self, context):
|
||||||
tests = []
|
tests = []
|
||||||
for subtest in FuzzerTestSuite.SUB_TESTS:
|
for subtest in FuzzerTestSuite.SUB_TESTS:
|
||||||
shell = '%s_fuzzer' % subtest
|
shell = 'v8_simple_%s_fuzzer' % subtest
|
||||||
for fname in os.listdir(os.path.join(self.root, subtest)):
|
for fname in os.listdir(os.path.join(self.root, subtest)):
|
||||||
if not os.path.isfile(os.path.join(self.root, subtest, fname)):
|
if not os.path.isfile(os.path.join(self.root, subtest, fname)):
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user