[wasm] Move the wasm-module-runner from test/cctest to test/common
The wasm-module-runner is used both in cctests and in fuzzers. As discussed offline, it is weird to include cctest header files in fuzzers, so I introduce a new test/common directory which contains the common files. R=titzer@chromium.org, jochen@chromium.org Review-Url: https://codereview.chromium.org/2335193002 Cr-Commit-Position: refs/heads/master@{#39411}
This commit is contained in:
parent
c7d7ca361d
commit
cc7926d672
18
BUILD.gn
18
BUILD.gn
@ -2584,15 +2584,23 @@ v8_source_set("regexp_fuzzer") {
|
||||
v8_fuzzer("regexp_fuzzer") {
|
||||
}
|
||||
|
||||
v8_source_set("wasm_module_runner") {
|
||||
sources = [
|
||||
"test/common/wasm/wasm-module-runner.cc",
|
||||
"test/common/wasm/wasm-module-runner.h",
|
||||
]
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
}
|
||||
|
||||
v8_source_set("wasm_fuzzer") {
|
||||
sources = [
|
||||
"test/cctest/wasm/wasm-module-runner.cc",
|
||||
"test/cctest/wasm/wasm-module-runner.h",
|
||||
"test/fuzzer/wasm.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":fuzzer_support",
|
||||
":wasm_module_runner",
|
||||
]
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
@ -2603,13 +2611,12 @@ v8_fuzzer("wasm_fuzzer") {
|
||||
|
||||
v8_source_set("wasm_asmjs_fuzzer") {
|
||||
sources = [
|
||||
"test/cctest/wasm/wasm-module-runner.cc",
|
||||
"test/cctest/wasm/wasm-module-runner.h",
|
||||
"test/fuzzer/wasm-asmjs.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":fuzzer_support",
|
||||
":wasm_module_runner",
|
||||
]
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
@ -2620,13 +2627,12 @@ v8_fuzzer("wasm_asmjs_fuzzer") {
|
||||
|
||||
v8_source_set("wasm_code_fuzzer") {
|
||||
sources = [
|
||||
"test/cctest/wasm/wasm-module-runner.cc",
|
||||
"test/cctest/wasm/wasm-module-runner.h",
|
||||
"test/fuzzer/wasm-code.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":fuzzer_support",
|
||||
":wasm_module_runner",
|
||||
]
|
||||
|
||||
configs = [ ":internal_config" ]
|
||||
|
@ -60,6 +60,7 @@ v8_executable("cctest") {
|
||||
deps = [
|
||||
":resources",
|
||||
"../..:v8_libplatform",
|
||||
"../..:wasm_module_runner",
|
||||
"//build/config/sanitizers:deps",
|
||||
"//build/win:default_exe_manifest",
|
||||
]
|
||||
|
@ -198,8 +198,6 @@
|
||||
'wasm/test-wasm-stack.cc',
|
||||
'wasm/test-wasm-trap-position.cc',
|
||||
'wasm/wasm-run-utils.h',
|
||||
'wasm/wasm-module-runner.cc',
|
||||
'wasm/wasm-module-runner.h',
|
||||
],
|
||||
'cctest_sources_ia32': [ ### gcmole(arch:ia32) ###
|
||||
'test-assembler-ia32.cc',
|
||||
@ -300,6 +298,8 @@
|
||||
'../..',
|
||||
],
|
||||
'sources': [
|
||||
'../common/wasm/wasm-module-runner.cc',
|
||||
'../common/wasm/wasm-module-runner.h',
|
||||
'<@(cctest_sources)',
|
||||
'<(generated_file)',
|
||||
],
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "test/cctest/cctest.h"
|
||||
#include "test/cctest/wasm/test-signatures.h"
|
||||
#include "test/cctest/wasm/wasm-module-runner.h"
|
||||
#include "test/common/wasm/wasm-module-runner.h"
|
||||
|
||||
using namespace v8::base;
|
||||
using namespace v8::internal;
|
||||
|
3
test/common/DEPS
Normal file
3
test/common/DEPS
Normal file
@ -0,0 +1,3 @@
|
||||
include_rules = [
|
||||
"+src",
|
||||
]
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "test/cctest/wasm/wasm-module-runner.h"
|
||||
#include "test/common/wasm/wasm-module-runner.h"
|
||||
|
||||
#include "src/handles.h"
|
||||
#include "src/isolate.h"
|
@ -110,8 +110,8 @@
|
||||
],
|
||||
'sources': [ ### gcmole(all) ###
|
||||
'wasm.cc',
|
||||
'../cctest/wasm/wasm-module-runner.cc',
|
||||
'../cctest/wasm/wasm-module-runner.h',
|
||||
'../common/wasm/wasm-module-runner.cc',
|
||||
'../common/wasm/wasm-module-runner.h',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -138,8 +138,8 @@
|
||||
],
|
||||
'sources': [ ### gcmole(all) ###
|
||||
'wasm-asmjs.cc',
|
||||
'../cctest/wasm/wasm-module-runner.cc',
|
||||
'../cctest/wasm/wasm-module-runner.h',
|
||||
'../common/wasm/wasm-module-runner.cc',
|
||||
'../common/wasm/wasm-module-runner.h',
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -166,8 +166,8 @@
|
||||
],
|
||||
'sources': [ ### gcmole(all) ###
|
||||
'wasm-code.cc',
|
||||
'../cctest/wasm/wasm-module-runner.cc',
|
||||
'../cctest/wasm/wasm-module-runner.h',
|
||||
'../common/wasm/wasm-module-runner.cc',
|
||||
'../common/wasm/wasm-module-runner.h',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "src/objects.h"
|
||||
#include "src/wasm/wasm-js.h"
|
||||
#include "src/wasm/wasm-module.h"
|
||||
#include "test/cctest/wasm/wasm-module-runner.h"
|
||||
#include "test/common/wasm/wasm-module-runner.h"
|
||||
#include "test/fuzzer/fuzzer-support.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "src/wasm/wasm-js.h"
|
||||
#include "src/wasm/wasm-module.h"
|
||||
#include "test/cctest/wasm/test-signatures.h"
|
||||
#include "test/cctest/wasm/wasm-module-runner.h"
|
||||
#include "test/common/wasm/wasm-module-runner.h"
|
||||
#include "test/fuzzer/fuzzer-support.h"
|
||||
|
||||
using namespace v8::internal::wasm;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "src/objects.h"
|
||||
#include "src/wasm/wasm-js.h"
|
||||
#include "src/wasm/wasm-module.h"
|
||||
#include "test/cctest/wasm/wasm-module-runner.h"
|
||||
#include "test/common/wasm/wasm-module-runner.h"
|
||||
#include "test/fuzzer/fuzzer-support.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
|
Loading…
Reference in New Issue
Block a user