@ -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,28 +106,31 @@ ROCKS_TESTS = [
% s ]
% s ]
# Generate a test rule for each entry in ROCKS_TESTS
# Generate a test rule for each entry in ROCKS_TESTS
for test_cfg in ROCKS_TESTS :
# Do not build the tests in opt mode, since SyncPoint and other test code
test_name = test_cfg [ 0 ]
# will not be included.
test_cc = test_cfg [ 1 ]
if not is_opt_mode :
ttype = " gtest " if test_cfg [ 2 ] == " parallel " else " simple "
for test_cfg in ROCKS_TESTS :
test_bin = test_name + " _bin "
test_name = test_cfg [ 0 ]
test_cc = test_cfg [ 1 ]
cpp_binary (
ttype = " gtest " if test_cfg [ 2 ] == " parallel " else " simple "
name = test_bin ,
test_bin = test_name + " _bin "
srcs = [ test_cc ] ,
deps = [ " :rocksdb_test_lib " ] ,
cpp_binary (
preprocessor_flags = rocksdb_preprocessor_flags ,
name = test_bin ,
arch_preprocessor_flags = rocksdb_arch_preprocessor_flags ,
srcs = [ test_cc ] ,
compiler_flags = rocksdb_compiler_flags ,
deps = [ " :rocksdb_test_lib " ] ,
external_deps = rocksdb_external_deps ,
preprocessor_flags = rocksdb_preprocessor_flags ,
)
arch_preprocessor_flags = rocksdb_arch_preprocessor_flags ,
compiler_flags = rocksdb_compiler_flags ,
custom_unittest (
external_deps = rocksdb_external_deps ,
name = test_name ,
)
type = ttype ,
deps = [ " : " + test_bin ] ,
custom_unittest (
command = [ TEST_RUNNER , BUCK_BINS + test_bin ]
name = test_name ,
)
type = ttype ,
deps = [ " : " + test_bin ] ,
command = [ TEST_RUNNER , BUCK_BINS + test_bin ]
)
custom_unittest (
custom_unittest (
name = " make_rocksdbjavastatic " ,
name = " make_rocksdbjavastatic " ,