TARGETS file not include tests in opt mode
Summary: Do not build the tests in opt mode, since SyncPoint and other test code will not be included. Closes https://github.com/facebook/rocksdb/pull/3204 Differential Revision: D6431154 Pulled By: yiwu-arbug fbshipit-source-id: c404ef042c1a6f679e5c1dc57600b3d8cb52fc28
This commit is contained in:
parent
ffacaaa3ea
commit
54095d3389
12
TARGETS
12
TARGETS
@ -53,6 +53,15 @@ rocksdb_arch_preprocessor_flags = {
|
|||||||
"x86_64": ["-DHAVE_SSE42"],
|
"x86_64": ["-DHAVE_SSE42"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_mode = read_config("fbcode", "build_mode")
|
||||||
|
|
||||||
|
is_opt_mode = build_mode.startswith("opt")
|
||||||
|
|
||||||
|
# -DNDEBUG is added by default in opt mode in fbcode. But adding it twice
|
||||||
|
# doesn't harm and avoid forgetting to add it.
|
||||||
|
if is_opt_mode:
|
||||||
|
rocksdb_compiler_flags.append("-DNDEBUG")
|
||||||
|
|
||||||
cpp_library(
|
cpp_library(
|
||||||
name = "rocksdb_lib",
|
name = "rocksdb_lib",
|
||||||
srcs = [
|
srcs = [
|
||||||
@ -1016,6 +1025,9 @@ ROCKS_TESTS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Generate a test rule for each entry in ROCKS_TESTS
|
# Generate a test rule for each entry in ROCKS_TESTS
|
||||||
|
# Do not build the tests in opt mode, since SyncPoint and other test code
|
||||||
|
# will not be included.
|
||||||
|
if not is_opt_mode:
|
||||||
for test_cfg in ROCKS_TESTS:
|
for test_cfg in ROCKS_TESTS:
|
||||||
test_name = test_cfg[0]
|
test_name = test_cfg[0]
|
||||||
test_cc = test_cfg[1]
|
test_cc = test_cfg[1]
|
||||||
|
@ -56,6 +56,15 @@ rocksdb_preprocessor_flags = [
|
|||||||
rocksdb_arch_preprocessor_flags = {
|
rocksdb_arch_preprocessor_flags = {
|
||||||
"x86_64": ["-DHAVE_SSE42"],
|
"x86_64": ["-DHAVE_SSE42"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_mode = read_config("fbcode", "build_mode")
|
||||||
|
|
||||||
|
is_opt_mode = build_mode.startswith("opt")
|
||||||
|
|
||||||
|
# -DNDEBUG is added by default in opt mode in fbcode. But adding it twice
|
||||||
|
# doesn't harm and avoid forgetting to add it.
|
||||||
|
if is_opt_mode:
|
||||||
|
rocksdb_compiler_flags.append("-DNDEBUG")
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@ -97,6 +106,9 @@ ROCKS_TESTS = [
|
|||||||
%s]
|
%s]
|
||||||
|
|
||||||
# Generate a test rule for each entry in ROCKS_TESTS
|
# Generate a test rule for each entry in ROCKS_TESTS
|
||||||
|
# Do not build the tests in opt mode, since SyncPoint and other test code
|
||||||
|
# will not be included.
|
||||||
|
if not is_opt_mode:
|
||||||
for test_cfg in ROCKS_TESTS:
|
for test_cfg in ROCKS_TESTS:
|
||||||
test_name = test_cfg[0]
|
test_name = test_cfg[0]
|
||||||
test_cc = test_cfg[1]
|
test_cc = test_cfg[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user