提交 31d46993 编写于 作者: Y Yi Wu 提交者: Facebook Github Bot

Update TARGETS file template (#4426)

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

Differential Revision: D10025053

Pulled By: yiwu-arbug

fbshipit-source-id: e6a0a702bfd401fc1af240ee446f5690f0bcd85d
上级 3c350a7c
...@@ -326,6 +326,7 @@ cpp_library( ...@@ -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 = [ ...@@ -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): ...@@ -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 ...@@ -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: ...@@ -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],
) )
""" """
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册