Exclude c_test from buck build opt mode (#7093)

Summary:
Fix a Facebook internal build

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7093

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)

Reviewed By: ajkr

Differential Revision: D22412528

Pulled By: pdillinger

fbshipit-source-id: 8e55c43dbf95386597e4cc690c41d9cbdcee03aa
This commit is contained in:
Peter Dillinger 2020-07-07 11:24:02 -07:00 committed by Facebook GitHub Bot
parent 92731b6b4a
commit dbf5c55812
2 changed files with 38 additions and 34 deletions

View File

@ -449,6 +449,7 @@ cpp_library(
external_deps = ROCKSDB_EXTERNAL_DEPS,
)
if not is_opt_mode:
cpp_binary(
name = "c_test_bin",
srcs = ["db/c_test.c"],
@ -459,6 +460,7 @@ cpp_binary(
deps = [":rocksdb_test_lib"],
)
if not is_opt_mode:
custom_unittest(
"c_test",
command = [

View File

@ -78,6 +78,7 @@ class TARGETSBuilder(object):
def add_c_test(self):
self.targets_file.write("""
if not is_opt_mode:
cpp_binary(
name = "c_test_bin",
srcs = ["db/c_test.c"],
@ -88,6 +89,7 @@ cpp_binary(
deps = [":rocksdb_test_lib"],
)
if not is_opt_mode:
custom_unittest(
"c_test",
command = [