Commit 9912ebe1 authored by Peter Dillinger's avatar Peter Dillinger Committed by Andrew Kryczka
Browse files

Exclude c_test from buck build opt mode

Summary: Fix a Facebook internal build

Test Plan: buck build @mode/opt :c_test :c_test_bin (was compilation
failure, now "not found")
buck build @mode/dev :c_test :c_test_bin (still passes)
parent 0fdd019f
......@@ -447,7 +447,8 @@ cpp_library(
external_deps = ROCKSDB_EXTERNAL_DEPS,
)
cpp_binary(
if not is_opt_mode:
cpp_binary(
name = "c_test_bin",
srcs = ["db/c_test.c"],
arch_preprocessor_flags = ROCKSDB_ARCH_PREPROCESSOR_FLAGS,
......@@ -455,16 +456,17 @@ cpp_binary(
compiler_flags = ROCKSDB_COMPILER_FLAGS,
preprocessor_flags = ROCKSDB_PREPROCESSOR_FLAGS,
deps = [":rocksdb_test_lib"],
)
)
custom_unittest(
if not is_opt_mode:
custom_unittest(
"c_test",
command = [
native.package_name() + "/buckifier/rocks_test_runner.sh",
"$(location :{})".format("c_test_bin"),
],
type = "simple",
)
)
cpp_library(
name = "env_basic_test_lib",
......
......@@ -78,7 +78,8 @@ class TARGETSBuilder(object):
def add_c_test(self):
self.targets_file.write("""
cpp_binary(
if not is_opt_mode:
cpp_binary(
name = "c_test_bin",
srcs = ["db/c_test.c"],
arch_preprocessor_flags = ROCKSDB_ARCH_PREPROCESSOR_FLAGS,
......@@ -86,16 +87,17 @@ cpp_binary(
compiler_flags = ROCKSDB_COMPILER_FLAGS,
preprocessor_flags = ROCKSDB_PREPROCESSOR_FLAGS,
deps = [":rocksdb_test_lib"],
)
)
custom_unittest(
if not is_opt_mode:
custom_unittest(
"c_test",
command = [
native.package_name() + "/buckifier/rocks_test_runner.sh",
"$(location :{})".format("c_test_bin"),
],
type = "simple",
)
)
""")
def register_test(self,
......
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