Skip to content

Commit

Permalink
Update TARGETS file template (facebook#4426)
Browse files Browse the repository at this point in the history
Summary:
Update template of TARGETS file according to recent changes in facebook#4371 , facebook#4363 and facebook@dbf44c3.
Pull Request resolved: facebook#4426

Differential Revision: D10025053

Pulled By: yiwu-arbug

fbshipit-source-id: e6a0a702bfd401fc1af240ee446f5690f0bcd85d
  • Loading branch information
Yi Wu authored and facebook-github-bot committed Sep 25, 2018
1 parent 3c350a7 commit 31d4699
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
6 changes: 1 addition & 5 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ cpp_library(
name = "rocksdb_tools_lib",
srcs = [
"tools/db_bench_tool.cc",
"tools/trace_analyzer_tool.cc",
"util/testutil.cc",
],
headers = AutoHeaders.RECURSIVE_GLOB,
Expand Down Expand Up @@ -919,11 +920,6 @@ ROCKS_TESTS = [
"db/range_del_aggregator_test.cc",
"serial",
],
[
"range_del_aggregator_bench",
"db/range_del_aggregator_bench.cc",
"serial",
],
[
"rate_limiter_test",
"util/rate_limiter_test.cc",
Expand Down
4 changes: 3 additions & 1 deletion buckifier/buckify_rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ def generate_targets(repo_path):
"rocksdb_test_lib",
src_mk.get("MOCK_LIB_SOURCES", []) +
src_mk.get("TEST_LIB_SOURCES", []) +
src_mk.get("EXP_LIB_SOURCES", []),
src_mk.get("EXP_LIB_SOURCES", []) +
src_mk.get("ANALYZER_LIB_SOURCES", []),
[":rocksdb_lib"])
# rocksdb_tools_lib
TARGETS.add_library(
"rocksdb_tools_lib",
src_mk.get("BENCH_LIB_SOURCES", []) +
src_mk.get("ANALYZER_LIB_SOURCES", []) +
["util/testutil.cc"],
[":rocksdb_lib"])

Expand Down
28 changes: 13 additions & 15 deletions buckifier/targets_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
rocksdb_target_header = """
load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders")
rocksdb_target_header = """load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders")
REPO_PATH = package_name() + "/"
Expand Down Expand Up @@ -121,21 +120,20 @@
ttype = "gtest" if test_cfg[2] == "parallel" else "simple"
test_bin = test_name + "_bin"
cpp_binary (
name = test_bin,
srcs = [test_cc],
deps = [":rocksdb_test_lib"],
preprocessor_flags = rocksdb_preprocessor_flags,
arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
compiler_flags = rocksdb_compiler_flags,
external_deps = rocksdb_external_deps,
cpp_binary(
name = test_bin,
srcs = [test_cc],
arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
compiler_flags = rocksdb_compiler_flags,
preprocessor_flags = rocksdb_preprocessor_flags,
deps = [":rocksdb_test_lib"],
external_deps = rocksdb_external_deps,
)
custom_unittest(
name = test_name,
type = ttype,
deps = [":" + test_bin],
command = [TEST_RUNNER, BUCK_BINS + test_bin]
name = test_name,
command = [TEST_RUNNER, BUCK_BINS + test_bin],
type = ttype,
deps = [":" + test_bin],
)
"""

0 comments on commit 31d4699

Please sign in to comment.