From 3b2f2719eb60afd26152ee5ef4834132ad0d7fe2 Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Sun, 26 Apr 2020 17:33:50 -0700 Subject: [PATCH] Update buckifier to unblock future internal release (#6726) Summary: Some recent PRs added new source files or modified TARGETS file manually. During next internal release, executing the following command will revert the manual changes. Update buckifier so that the following command ``` python buckfier/buckify_rocksdb.py ``` does not change TARGETS file. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6726 Test Plan: ``` python buckifier/buckify_rocksdb.py ``` Reviewed By: siying Differential Revision: D21098930 Pulled By: riversand963 fbshipit-source-id: e884f507fefef88163363c9097a460c98f1ed850 --- TARGETS | 16 ++++++++++++---- buckifier/buckify_rocksdb.py | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/TARGETS b/TARGETS index d247448ee5..1200c0023d 100644 --- a/TARGETS +++ b/TARGETS @@ -94,9 +94,6 @@ is_opt_mode = build_mode.startswith("opt") # -DNDEBUG is added by default in opt mode in fbcode. But adding it twice # doesn't harm and avoid forgetting to add it. ROCKSDB_COMPILER_FLAGS += (["-DNDEBUG"] if is_opt_mode else []) -ROCKSDB_STRESS_DEPS = ( - [":rocksdb_lib", ":rocksdb_test_lib"] if not is_opt_mode else [":rocksdb_lib"] -) sanitizer = read_config("fbcode", "sanitizer") @@ -207,6 +204,7 @@ cpp_library( "memory/arena.cc", "memory/concurrent_arena.cc", "memory/jemalloc_nodump_allocator.cc", + "memory/memkind_kmem_allocator.cc", "memtable/alloc_tracker.cc", "memtable/hash_linklist_rep.cc", "memtable/hash_skiplist_rep.cc", @@ -439,7 +437,10 @@ cpp_library( os_deps = ROCKSDB_OS_DEPS, os_preprocessor_flags = ROCKSDB_OS_PREPROCESSOR_FLAGS, preprocessor_flags = ROCKSDB_PREPROCESSOR_FLAGS, - deps = ROCKSDB_STRESS_DEPS, + deps = [ + ":rocksdb_lib", + ":rocksdb_test_lib", + ], external_deps = ROCKSDB_EXTERNAL_DEPS, ) @@ -1186,6 +1187,13 @@ ROCKS_TESTS = [ [], [], ], + [ + "memkind_kmem_allocator_test", + "memory/memkind_kmem_allocator_test.cc", + "serial", + [], + [], + ], [ "memory_test", "utilities/memory/memory_test.cc", diff --git a/buckifier/buckify_rocksdb.py b/buckifier/buckify_rocksdb.py index d2bba5940c..15fa0c2d8f 100644 --- a/buckifier/buckify_rocksdb.py +++ b/buckifier/buckify_rocksdb.py @@ -173,7 +173,7 @@ def generate_targets(repo_path, deps_map): src_mk.get("ANALYZER_LIB_SOURCES", []) + src_mk.get('STRESS_LIB_SOURCES', []) + ["test_util/testutil.cc"], - [":rocksdb_lib"]) + [":rocksdb_lib", ":rocksdb_test_lib"]) print("Extra dependencies:\n{0}".format(str(deps_map))) # test for every test we found in the Makefile