From 31d46993cc47a74261624aa2397983c1f7d8add2 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Tue, 25 Sep 2018 14:12:12 -0700 Subject: [PATCH] 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 --- TARGETS | 6 +----- buckifier/buckify_rocksdb.py | 4 +++- buckifier/targets_cfg.py | 28 +++++++++++++--------------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/TARGETS b/TARGETS index 0cce95393..8944e4167 100644 --- a/TARGETS +++ b/TARGETS @@ -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, @@ -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", diff --git a/buckifier/buckify_rocksdb.py b/buckifier/buckify_rocksdb.py index 38aa0bf18..96903af68 100644 --- a/buckifier/buckify_rocksdb.py +++ b/buckifier/buckify_rocksdb.py @@ -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"]) diff --git a/buckifier/targets_cfg.py b/buckifier/targets_cfg.py index 608f66a4d..e63a2860f 100644 --- a/buckifier/targets_cfg.py +++ b/buckifier/targets_cfg.py @@ -2,8 +2,7 @@ from __future__ import absolute_import 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() + "/" @@ -121,21 +120,20 @@ if not is_opt_mode: 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], ) - """