Update TARGETS file template (#4426)

Summary:
Update template of TARGETS file according to recent changes in #4371 , #4363 and dbf44c314b.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4426

Differential Revision: D10025053

Pulled By: yiwu-arbug

fbshipit-source-id: e6a0a702bfd401fc1af240ee446f5690f0bcd85d
main
Yi Wu 6 years ago committed by Facebook Github Bot
parent 3c350a7cf0
commit 31d46993cc
  1. 6
      TARGETS
  2. 4
      buckifier/buckify_rocksdb.py
  3. 28
      buckifier/targets_cfg.py

@ -326,6 +326,7 @@ cpp_library(
name = "rocksdb_tools_lib", name = "rocksdb_tools_lib",
srcs = [ srcs = [
"tools/db_bench_tool.cc", "tools/db_bench_tool.cc",
"tools/trace_analyzer_tool.cc",
"util/testutil.cc", "util/testutil.cc",
], ],
headers = AutoHeaders.RECURSIVE_GLOB, headers = AutoHeaders.RECURSIVE_GLOB,
@ -919,11 +920,6 @@ ROCKS_TESTS = [
"db/range_del_aggregator_test.cc", "db/range_del_aggregator_test.cc",
"serial", "serial",
], ],
[
"range_del_aggregator_bench",
"db/range_del_aggregator_bench.cc",
"serial",
],
[ [
"rate_limiter_test", "rate_limiter_test",
"util/rate_limiter_test.cc", "util/rate_limiter_test.cc",

@ -109,12 +109,14 @@ def generate_targets(repo_path):
"rocksdb_test_lib", "rocksdb_test_lib",
src_mk.get("MOCK_LIB_SOURCES", []) + src_mk.get("MOCK_LIB_SOURCES", []) +
src_mk.get("TEST_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_lib"])
# rocksdb_tools_lib # rocksdb_tools_lib
TARGETS.add_library( TARGETS.add_library(
"rocksdb_tools_lib", "rocksdb_tools_lib",
src_mk.get("BENCH_LIB_SOURCES", []) + src_mk.get("BENCH_LIB_SOURCES", []) +
src_mk.get("ANALYZER_LIB_SOURCES", []) +
["util/testutil.cc"], ["util/testutil.cc"],
[":rocksdb_lib"]) [":rocksdb_lib"])

@ -2,8 +2,7 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
from __future__ import unicode_literals from __future__ import unicode_literals
rocksdb_target_header = """ rocksdb_target_header = """load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders")
load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders")
REPO_PATH = package_name() + "/" REPO_PATH = package_name() + "/"
@ -121,21 +120,20 @@ if not is_opt_mode:
ttype = "gtest" if test_cfg[2] == "parallel" else "simple" ttype = "gtest" if test_cfg[2] == "parallel" else "simple"
test_bin = test_name + "_bin" test_bin = test_name + "_bin"
cpp_binary ( cpp_binary(
name = test_bin, name = test_bin,
srcs = [test_cc], srcs = [test_cc],
deps = [":rocksdb_test_lib"], arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
preprocessor_flags = rocksdb_preprocessor_flags, compiler_flags = rocksdb_compiler_flags,
arch_preprocessor_flags = rocksdb_arch_preprocessor_flags, preprocessor_flags = rocksdb_preprocessor_flags,
compiler_flags = rocksdb_compiler_flags, deps = [":rocksdb_test_lib"],
external_deps = rocksdb_external_deps, external_deps = rocksdb_external_deps,
) )
custom_unittest( custom_unittest(
name = test_name, name = test_name,
type = ttype, command = [TEST_RUNNER, BUCK_BINS + test_bin],
deps = [":" + test_bin], type = ttype,
command = [TEST_RUNNER, BUCK_BINS + test_bin] deps = [":" + test_bin],
) )
""" """

Loading…
Cancel
Save