Commit b1d09bf6 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[gyp] move build targets for tests to gypfiles.

Bug: v8:7335
Change-Id: I6610bba00ff558de5826934c326fc2873c91a1a3
Reviewed-on: https://chromium-review.googlesource.com/890742Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50944}
parent ff056334
...@@ -279,10 +279,11 @@ GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \ ...@@ -279,10 +279,11 @@ GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
gypfiles/shim_headers.gypi gypfiles/features.gypi \ gypfiles/shim_headers.gypi gypfiles/features.gypi \
gypfiles/standalone.gypi \ gypfiles/standalone.gypi \
gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \ gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \
gypfiles/cctest.gyp test/fuzzer/fuzzer.gyp \ gypfiles/cctest.gyp gypfiles/fuzzer.gyp \
test/unittests/unittests.gyp gypfiles/v8.gyp \ gypfiles/unittests.gyp gypfiles/v8.gyp \
gypfiles/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \ gypfiles/parser-shell.gyp gypfiles/gmock.gyp gypfiles/gtest.gyp \
gypfiles/samples.gyp gypfiles/v8vtune.gyp gypfiles/d8.gyp gypfiles/samples.gyp gypfiles/v8vtune.gyp gypfiles/d8.gyp \
gypfiles/inspector-test.gyp gypfiles/mkgrokdump.gyp
# Generates all combinations of ARCHES and MODES, e.g. "ia32.release". # Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
'target_name': 'All', 'target_name': 'All',
'type': 'none', 'type': 'none',
'dependencies': [ 'dependencies': [
'../gypfiles/d8.gyp:d8', 'd8.gyp:d8',
'../test/inspector/inspector.gyp:*', 'inspector-test.gyp:*',
'../test/mkgrokdump/mkgrokdump.gyp:*', 'mkgrokdump.gyp:*',
], ],
'conditions': [ 'conditions': [
['component!="shared_library"', { ['component!="shared_library"', {
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
'dependencies': [ 'dependencies': [
'samples.gyp:*', 'samples.gyp:*',
'cctest.gyp:*', 'cctest.gyp:*',
'../test/fuzzer/fuzzer.gyp:*', 'fuzzer.gyp:*',
'../test/unittests/unittests.gyp:*', 'unittests.gyp:*',
], ],
}], }],
['test_isolation_mode != "noop"', { ['test_isolation_mode != "noop"', {
......
...@@ -12,39 +12,39 @@ ...@@ -12,39 +12,39 @@
], ],
'sources': [ 'sources': [
# Sources based on files in r173 of gmock. # Sources based on files in r173 of gmock.
'gmock/include/gmock/gmock-actions.h', '../testing/gmock/include/gmock/gmock-actions.h',
'gmock/include/gmock/gmock-cardinalities.h', '../testing/gmock/include/gmock/gmock-cardinalities.h',
'gmock/include/gmock/gmock-generated-actions.h', '../testing/gmock/include/gmock/gmock-generated-actions.h',
'gmock/include/gmock/gmock-generated-function-mockers.h', '../testing/gmock/include/gmock/gmock-generated-function-mockers.h',
'gmock/include/gmock/gmock-generated-matchers.h', '../testing/gmock/include/gmock/gmock-generated-matchers.h',
'gmock/include/gmock/gmock-generated-nice-strict.h', '../testing/gmock/include/gmock/gmock-generated-nice-strict.h',
'gmock/include/gmock/gmock-matchers.h', '../testing/gmock/include/gmock/gmock-matchers.h',
'gmock/include/gmock/gmock-spec-builders.h', '../testing/gmock/include/gmock/gmock-spec-builders.h',
'gmock/include/gmock/gmock.h', '../testing/gmock/include/gmock/gmock.h',
'gmock/include/gmock/internal/gmock-generated-internal-utils.h', '../testing/gmock/include/gmock/internal/gmock-generated-internal-utils.h',
'gmock/include/gmock/internal/gmock-internal-utils.h', '../testing/gmock/include/gmock/internal/gmock-internal-utils.h',
'gmock/include/gmock/internal/gmock-port.h', '../testing/gmock/include/gmock/internal/gmock-port.h',
'gmock/src/gmock-all.cc', '../testing/gmock/src/gmock-all.cc',
'gmock/src/gmock-cardinalities.cc', '../testing/gmock/src/gmock-cardinalities.cc',
'gmock/src/gmock-internal-utils.cc', '../testing/gmock/src/gmock-internal-utils.cc',
'gmock/src/gmock-matchers.cc', '../testing/gmock/src/gmock-matchers.cc',
'gmock/src/gmock-spec-builders.cc', '../testing/gmock/src/gmock-spec-builders.cc',
'gmock/src/gmock.cc', '../testing/gmock/src/gmock.cc',
'gmock-support.h', # gMock helpers '../testing/gmock-support.h', # gMock helpers
'gmock_custom/gmock/internal/custom/gmock-port.h', '../testing/gmock_custom/gmock/internal/custom/gmock-port.h',
], ],
'sources!': [ 'sources!': [
'gmock/src/gmock-all.cc', # Not needed by our build. '../testing/gmock/src/gmock-all.cc', # Not needed by our build.
], ],
'include_dirs': [ 'include_dirs': [
'gmock_custom', '../testing/gmock_custom',
'gmock', '../testing/gmock',
'gmock/include', '../testing/gmock/include',
], ],
'all_dependent_settings': { 'all_dependent_settings': {
'include_dirs': [ 'include_dirs': [
'gmock_custom', '../testing/gmock_custom',
'gmock/include', # So that gmock headers can find themselves. '../testing/gmock/include', # So that gmock headers can find themselves.
], ],
}, },
'export_dependent_settings': [ 'export_dependent_settings': [
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
'gmock', 'gmock',
], ],
'sources': [ 'sources': [
'gmock/src/gmock_main.cc', '../testing/gmock/src/gmock_main.cc',
], ],
}, },
], ],
......
...@@ -9,42 +9,42 @@ ...@@ -9,42 +9,42 @@
'toolsets': ['host', 'target'], 'toolsets': ['host', 'target'],
'type': 'static_library', 'type': 'static_library',
'sources': [ 'sources': [
'gtest/include/gtest/gtest-death-test.h', '../testing/gtest/include/gtest/gtest-death-test.h',
'gtest/include/gtest/gtest-message.h', '../testing/gtest/include/gtest/gtest-message.h',
'gtest/include/gtest/gtest-param-test.h', '../testing/gtest/include/gtest/gtest-param-test.h',
'gtest/include/gtest/gtest-printers.h', '../testing/gtest/include/gtest/gtest-printers.h',
'gtest/include/gtest/gtest-spi.h', '../testing/gtest/include/gtest/gtest-spi.h',
'gtest/include/gtest/gtest-test-part.h', '../testing/gtest/include/gtest/gtest-test-part.h',
'gtest/include/gtest/gtest-typed-test.h', '../testing/gtest/include/gtest/gtest-typed-test.h',
'gtest/include/gtest/gtest.h', '../testing/gtest/include/gtest/gtest.h',
'gtest/include/gtest/gtest_pred_impl.h', '../testing/gtest/include/gtest/gtest_pred_impl.h',
'gtest/include/gtest/internal/gtest-death-test-internal.h', '../testing/gtest/include/gtest/internal/gtest-death-test-internal.h',
'gtest/include/gtest/internal/gtest-filepath.h', '../testing/gtest/include/gtest/internal/gtest-filepath.h',
'gtest/include/gtest/internal/gtest-internal.h', '../testing/gtest/include/gtest/internal/gtest-internal.h',
'gtest/include/gtest/internal/gtest-linked_ptr.h', '../testing/gtest/include/gtest/internal/gtest-linked_ptr.h',
'gtest/include/gtest/internal/gtest-param-util-generated.h', '../testing/gtest/include/gtest/internal/gtest-param-util-generated.h',
'gtest/include/gtest/internal/gtest-param-util.h', '../testing/gtest/include/gtest/internal/gtest-param-util.h',
'gtest/include/gtest/internal/gtest-port.h', '../testing/gtest/include/gtest/internal/gtest-port.h',
'gtest/include/gtest/internal/gtest-string.h', '../testing/gtest/include/gtest/internal/gtest-string.h',
'gtest/include/gtest/internal/gtest-tuple.h', '../testing/gtest/include/gtest/internal/gtest-tuple.h',
'gtest/include/gtest/internal/gtest-type-util.h', '../testing/gtest/include/gtest/internal/gtest-type-util.h',
'gtest/src/gtest-all.cc', '../testing/gtest/src/gtest-all.cc',
'gtest/src/gtest-death-test.cc', '../testing/gtest/src/gtest-death-test.cc',
'gtest/src/gtest-filepath.cc', '../testing/gtest/src/gtest-filepath.cc',
'gtest/src/gtest-internal-inl.h', '../testing/gtest/src/gtest-internal-inl.h',
'gtest/src/gtest-port.cc', '../testing/gtest/src/gtest-port.cc',
'gtest/src/gtest-printers.cc', '../testing/gtest/src/gtest-printers.cc',
'gtest/src/gtest-test-part.cc', '../testing/gtest/src/gtest-test-part.cc',
'gtest/src/gtest-typed-test.cc', '../testing/gtest/src/gtest-typed-test.cc',
'gtest/src/gtest.cc', '../testing/gtest/src/gtest.cc',
'gtest-support.h', '../testing/gtest-support.h',
], ],
'sources!': [ 'sources!': [
'gtest/src/gtest-all.cc', # Not needed by our build. '../testing/gtest/src/gtest-all.cc', # Not needed by our build.
], ],
'include_dirs': [ 'include_dirs': [
'gtest', '../testing/gtest',
'gtest/include', '../testing/gtest/include',
], ],
'dependencies': [ 'dependencies': [
'gtest_prod', 'gtest_prod',
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
'UNIT_TEST', 'UNIT_TEST',
], ],
'include_dirs': [ 'include_dirs': [
'gtest/include', # So that gtest headers can find themselves. '../testing/gtest/include', # So that gtest headers can find themselves.
], ],
'target_conditions': [ 'target_conditions': [
['_type=="executable"', { ['_type=="executable"', {
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
'gtest', 'gtest',
], ],
'sources': [ 'sources': [
'gtest/src/gtest_main.cc', '../testing/gtest/src/gtest_main.cc',
], ],
}, },
{ {
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
'toolsets': ['host', 'target'], 'toolsets': ['host', 'target'],
'type': 'none', 'type': 'none',
'sources': [ 'sources': [
'gtest/include/gtest/gtest_prod.h', '../testing/gtest/include/gtest/gtest_prod.h',
], ],
}, },
], ],
......
...@@ -6,25 +6,25 @@ ...@@ -6,25 +6,25 @@
'variables': { 'variables': {
'v8_code': 1, 'v8_code': 1,
}, },
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'], 'includes': ['toolchain.gypi', 'features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'inspector-test', 'target_name': 'inspector-test',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'../../gypfiles/v8.gyp:v8_libplatform', 'v8.gyp:v8_libplatform',
'../../gypfiles/v8.gyp:v8_libbase', 'v8.gyp:v8_libbase',
'../../gypfiles/v8.gyp:v8', 'v8.gyp:v8',
], ],
'include_dirs': [ 'include_dirs': [
'../..', '..',
], ],
'sources': [ 'sources': [
'inspector-test.cc', '../test/inspector/inspector-test.cc',
'isolate-data.cc', '../test/inspector/isolate-data.cc',
'isolate-data.h', '../test/inspector/isolate-data.h',
'task-runner.cc', '../test/inspector/task-runner.cc',
'task-runner.h', '../test/inspector/task-runner.h',
], ],
'conditions': [ 'conditions': [
['v8_enable_i18n_support==1', { ['v8_enable_i18n_support==1', {
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
'inspector-test', 'inspector-test',
], ],
'includes': [ 'includes': [
'../../gypfiles/isolate.gypi', 'isolate.gypi',
], ],
'sources': [ 'sources': [
'inspector.isolate', '../test/inspector/inspector.isolate',
], ],
}, },
], ],
......
...@@ -6,21 +6,21 @@ ...@@ -6,21 +6,21 @@
'variables': { 'variables': {
'v8_code': 1, 'v8_code': 1,
}, },
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'], 'includes': ['toolchain.gypi', 'features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'mkgrokdump', 'target_name': 'mkgrokdump',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
'../../gypfiles/v8.gyp:v8', 'v8.gyp:v8',
'../../gypfiles/v8.gyp:v8_libbase', 'v8.gyp:v8_libbase',
'../../gypfiles/v8.gyp:v8_libplatform', 'v8.gyp:v8_libplatform',
], ],
'include_dirs': [ 'include_dirs': [
'../..', '..',
], ],
'sources': [ 'sources': [
'mkgrokdump.cc', '../test/mkgrokdump/mkgrokdump.cc',
], ],
}, },
], ],
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
'mkgrokdump', 'mkgrokdump',
], ],
'includes': [ 'includes': [
'../../gypfiles/isolate.gypi', 'isolate.gypi',
], ],
'sources': [ 'sources': [
'mkgrokdump.isolate', '../test/mkgrokdump/mkgrokdump.isolate',
], ],
}, },
], ],
......
This diff is collapsed.
...@@ -28,12 +28,12 @@ GYP_FILES = [ ...@@ -28,12 +28,12 @@ GYP_FILES = [
os.path.join(V8_BASE, 'gypfiles', 'v8vtune.gyp'), os.path.join(V8_BASE, 'gypfiles', 'v8vtune.gyp'),
os.path.join(V8_BASE, 'gypfiles', 'samples.gyp'), os.path.join(V8_BASE, 'gypfiles', 'samples.gyp'),
os.path.join(V8_BASE, 'gypfiles', 'cctest.gyp'), os.path.join(V8_BASE, 'gypfiles', 'cctest.gyp'),
os.path.join(V8_BASE, 'test', 'fuzzer', 'fuzzer.gyp'), os.path.join(V8_BASE, 'gypfiles', 'fuzzer.gyp'),
os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), os.path.join(V8_BASE, 'gypfiles', 'unittests.gyp'),
os.path.join(V8_BASE, 'test', 'inspector', 'inspector.gyp'), os.path.join(V8_BASE, 'gypfiles', 'inspector-test.gyp'),
os.path.join(V8_BASE, 'test', 'mkgrokdump', 'mkgrokdump.gyp'), os.path.join(V8_BASE, 'gypfiles', 'mkgrokdump.gyp'),
os.path.join(V8_BASE, 'testing', 'gmock.gyp'), os.path.join(V8_BASE, 'gypfiles', 'gmock.gyp'),
os.path.join(V8_BASE, 'testing', 'gtest.gyp'), os.path.join(V8_BASE, 'gypfiles', 'gtest.gyp'),
os.path.join(V8_BASE, 'gypfiles', 'parser-shell.gyp'), os.path.join(V8_BASE, 'gypfiles', 'parser-shell.gyp'),
] ]
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
'dependencies': [ 'dependencies': [
'../gypfiles/cctest.gyp:cctest_run', '../gypfiles/cctest.gyp:cctest_run',
'debugger/debugger.gyp:debugger_run', 'debugger/debugger.gyp:debugger_run',
'fuzzer/fuzzer.gyp:fuzzer_run', '../gypfiles/fuzzer.gyp:fuzzer_run',
'inspector/inspector.gyp:inspector-test_run', '../gypfiles/inspector-test.gyp:inspector-test_run',
'intl/intl.gyp:intl_run', 'intl/intl.gyp:intl_run',
'message/message.gyp:message_run', 'message/message.gyp:message_run',
'mjsunit/mjsunit.gyp:mjsunit_run', 'mjsunit/mjsunit.gyp:mjsunit_run',
'preparser/preparser.gyp:preparser_run', 'preparser/preparser.gyp:preparser_run',
'unittests/unittests.gyp:unittests_run', '../gypfiles/unittests.gyp:unittests_run',
'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run', 'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run',
'webkit/webkit.gyp:webkit_run', 'webkit/webkit.gyp:webkit_run',
], ],
......
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
'dependencies': [ 'dependencies': [
'../gypfiles/cctest.gyp:cctest_run', '../gypfiles/cctest.gyp:cctest_run',
'debugger/debugger.gyp:debugger_run', 'debugger/debugger.gyp:debugger_run',
'fuzzer/fuzzer.gyp:fuzzer_run', '../gypfiles/fuzzer.gyp:fuzzer_run',
'inspector/inspector.gyp:inspector-test_run', '../gypfiles/inspector-test.gyp:inspector-test_run',
'intl/intl.gyp:intl_run', 'intl/intl.gyp:intl_run',
'message/message.gyp:message_run', 'message/message.gyp:message_run',
'mjsunit/mjsunit.gyp:mjsunit_run', 'mjsunit/mjsunit.gyp:mjsunit_run',
'preparser/preparser.gyp:preparser_run', 'preparser/preparser.gyp:preparser_run',
'unittests/unittests.gyp:unittests_run', '../gypfiles/unittests.gyp:unittests_run',
'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run', 'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run',
], ],
'includes': [ 'includes': [
......
...@@ -45,18 +45,10 @@ the fuzzer is called `foo`. ...@@ -45,18 +45,10 @@ the fuzzer is called `foo`.
* Use this binary to reproduce issues found by cluster fuzz, e.g. * Use this binary to reproduce issues found by cluster fuzz, e.g.
`out/x64.debug/v8_simple_foo_fuzzer testcase.foo` `out/x64.debug/v8_simple_foo_fuzzer testcase.foo`
5. Copy the build rules of an existing fuzzer in 5. Copy the binary name and the test directory name in
[test/fuzzer/fuzzer.gyp](https://cs.chromium.org/chromium/src/v8/test/fuzzer/fuzzer.gyp),
e.g. the build rules for the
[wasm.cc](https://cs.chromium.org/chromium/src/v8/test/fuzzer/wasm.cc) fuzzer
are `v8_simple_wasm_fuzzer` and `wasm_fuzzer_lib`
* This build rule is needed to compile with gyp
6. Copy the binary name and the test directory name in
[test/fuzzer/fuzzer.isolate](https://cs.chromium.org/chromium/src/v8/test/fuzzer/fuzzer.isolate) [test/fuzzer/fuzzer.isolate](https://cs.chromium.org/chromium/src/v8/test/fuzzer/fuzzer.isolate)
7. Add the fuzzer to the FuzzerTestSuite in 6. Add the fuzzer to the FuzzerTestSuite in
[test/fuzzer/testcfg.py](https://cs.chromium.org/chromium/src/v8/test/fuzzer/testcfg.py) [test/fuzzer/testcfg.py](https://cs.chromium.org/chromium/src/v8/test/fuzzer/testcfg.py)
* This step is needed to run the fuzzer with the files created in Step 2 on * This step is needed to run the fuzzer with the files created in Step 2 on
......
This diff is collapsed.
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