Commit a4669ba1 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

Add target for common test headers

Change-Id: I2bd8027801e978a4469aa18daedf2d7b3a6a0322
Reviewed-on: https://chromium-review.googlesource.com/c/1463524Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59520}
parent 616510fe
......@@ -2182,6 +2182,8 @@ v8_source_set("v8_base") {
"src/objects-printer.cc",
"src/objects.cc",
"src/objects.h",
"src/objects/allocation-site-inl.h",
"src/objects/allocation-site.h",
"src/objects/api-callbacks-inl.h",
"src/objects/api-callbacks.h",
"src/objects/arguments-inl.h",
......@@ -2196,6 +2198,7 @@ v8_source_set("v8_base") {
"src/objects/code.h",
"src/objects/compilation-cache-inl.h",
"src/objects/compilation-cache.h",
"src/objects/data-handler.h",
"src/objects/debug-objects-inl.h",
"src/objects/debug-objects.cc",
"src/objects/debug-objects.h",
......@@ -2963,6 +2966,7 @@ v8_source_set("v8_base") {
":v8_headers",
":v8_libbase",
":v8_libsampler",
":v8_version",
"src/inspector:inspector",
]
......@@ -3155,6 +3159,10 @@ v8_component("v8_libbase") {
public_configs = [ ":libbase_config" ]
deps = [
":v8_headers",
]
public_deps = []
data = []
......@@ -3302,6 +3310,7 @@ v8_component("v8_libplatform") {
public_configs = [ ":libplatform_config" ]
deps = [
":v8_headers",
":v8_libbase",
]
}
......
......@@ -141,3 +141,24 @@ group("v8_run_num_fuzzer") {
"webkit:v8_webkit",
]
}
v8_header_set("common_test_headers") {
testonly = true
configs = []
public_deps = [
# We can't depend on this here, because if the "cctest" target depends on it
# we will get duplicate symbols.
#"../:v8_for_testing",
"../:v8_libbase",
]
sources = [
"common/assembler-tester.h",
"common/types-fuzz.h",
"common/wasm/flag-utils.h",
"common/wasm/test-signatures.h",
"common/wasm/wasm-macro-gen.h",
]
}
......@@ -241,7 +241,6 @@ v8_source_set("cctest_sources") {
"torque/test-torque.cc",
"trace-extension.cc",
"trace-extension.h",
"types-fuzz.h",
"unicode-helpers.cc",
"unicode-helpers.h",
"wasm/test-c-wasm-entry.cc",
......@@ -358,6 +357,7 @@ v8_source_set("cctest_sources") {
public_deps = [
":resources",
"..:common_test_headers",
"../..:v8_initializers",
"../..:v8_libbase",
"../..:v8_libplatform",
......
......@@ -10,7 +10,7 @@
#include "src/isolate.h"
#include "src/objects.h"
#include "test/cctest/cctest.h"
#include "test/cctest/types-fuzz.h"
#include "test/common/types-fuzz.h"
namespace v8 {
namespace internal {
......
......@@ -45,13 +45,13 @@ class Types {
name = Type::name(); \
types.push_back(name);
PROPER_BITSET_TYPE_LIST(DECLARE_TYPE)
#undef DECLARE_TYPE
#undef DECLARE_TYPE
SignedSmall = Type::SignedSmall();
UnsignedSmall = Type::UnsignedSmall();
object_map = isolate->factory()->NewMap(
JS_OBJECT_TYPE, JSObject::kHeaderSize);
object_map =
isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
smi = handle(Smi::FromInt(666), isolate);
boxed_smi = isolate->factory()->NewHeapNumber(666);
......@@ -161,9 +161,9 @@ class Types {
Type Fuzz(int depth = 4) {
switch (rng_->NextInt(depth == 0 ? 3 : 20)) {
case 0: { // bitset
#define COUNT_BITSET_TYPES(type, value) + 1
#define COUNT_BITSET_TYPES(type, value) +1
int n = 0 PROPER_BITSET_TYPE_LIST(COUNT_BITSET_TYPES);
#undef COUNT_BITSET_TYPES
#undef COUNT_BITSET_TYPES
// Pick a bunch of named bitsets and return their intersection.
Type result = Type::Any();
for (int i = 0, m = 1 + rng_->NextInt(3); i < m; ++i) {
......@@ -179,7 +179,7 @@ class Types {
} \
}
PROPER_BITSET_TYPE_LIST(PICK_BITSET_TYPE)
#undef PICK_BITSET_TYPE
#undef PICK_BITSET_TYPE
}
return result;
}
......
......@@ -285,6 +285,7 @@ v8_source_set("unittests_sources") {
]
deps = [
"..:common_test_headers",
"../..:v8_for_testing",
"../..:v8_libbase",
"../..:v8_libplatform",
......
......@@ -10,7 +10,7 @@
#include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/objects-inl.h"
#include "test/cctest/types-fuzz.h"
#include "test/common/types-fuzz.h"
#include "test/unittests/compiler/graph-unittest.h"
namespace v8 {
......
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