Include db_stress_tool in rocksdb tools lib (#5950)
Summary: include db_stress_tool in rocksdb tools lib Test Plan (on devserver): ``` $make db_stress $./db_stress $make all && make check ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/5950 Differential Revision: D18044399 Pulled By: riversand963 fbshipit-source-id: 895585abbbdfd8b954965921dba4b1400b7af1b1
This commit is contained in:
parent
5677f4f775
commit
925250f42f
13
Makefile
13
Makefile
@ -439,6 +439,8 @@ BENCHTOOLOBJECTS = $(BENCH_LIB_SOURCES:.cc=.o) $(LIBOBJECTS) $(TESTUTIL)
|
|||||||
|
|
||||||
ANALYZETOOLOBJECTS = $(ANALYZER_LIB_SOURCES:.cc=.o)
|
ANALYZETOOLOBJECTS = $(ANALYZER_LIB_SOURCES:.cc=.o)
|
||||||
|
|
||||||
|
STRESSTOOLOBJECTS = $(STRESS_LIB_SOURCES:.cc=.o) $(LIBOBJECTS) $(TESTUTIL)
|
||||||
|
|
||||||
EXPOBJECTS = $(LIBOBJECTS) $(TESTUTIL)
|
EXPOBJECTS = $(LIBOBJECTS) $(TESTUTIL)
|
||||||
|
|
||||||
TESTS = \
|
TESTS = \
|
||||||
@ -662,6 +664,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
LIBRARY = ${LIBNAME}.a
|
LIBRARY = ${LIBNAME}.a
|
||||||
TOOLS_LIBRARY = ${LIBNAME}_tools.a
|
TOOLS_LIBRARY = ${LIBNAME}_tools.a
|
||||||
|
STRESS_LIBRARY = ${LIBNAME}_stress.a
|
||||||
|
|
||||||
ROCKSDB_MAJOR = $(shell egrep "ROCKSDB_MAJOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
|
ROCKSDB_MAJOR = $(shell egrep "ROCKSDB_MAJOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
|
||||||
ROCKSDB_MINOR = $(shell egrep "ROCKSDB_MINOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
|
ROCKSDB_MINOR = $(shell egrep "ROCKSDB_MINOR.[0-9]" include/rocksdb/version.h | cut -d ' ' -f 3)
|
||||||
@ -751,6 +754,8 @@ static_lib: $(LIBRARY)
|
|||||||
|
|
||||||
shared_lib: $(SHARED)
|
shared_lib: $(SHARED)
|
||||||
|
|
||||||
|
stress_lib: $(STRESS_LIBRARY)
|
||||||
|
|
||||||
tools: $(TOOLS)
|
tools: $(TOOLS)
|
||||||
|
|
||||||
tools_lib: $(TOOLS_LIBRARY)
|
tools_lib: $(TOOLS_LIBRARY)
|
||||||
@ -1135,6 +1140,10 @@ $(TOOLS_LIBRARY): $(BENCH_LIB_SOURCES:.cc=.o) $(TOOL_LIB_SOURCES:.cc=.o) $(LIB_S
|
|||||||
$(AM_V_AR)rm -f $@
|
$(AM_V_AR)rm -f $@
|
||||||
$(AM_V_at)$(AR) $(ARFLAGS) $@ $^
|
$(AM_V_at)$(AR) $(ARFLAGS) $@ $^
|
||||||
|
|
||||||
|
$(STRESS_LIBRARY): $(LIB_SOURCES:.cc=.o) $(TESTUTIL) $(ANALYZER_LIB_SOURCES:.cc=.o) $(STRESS_LIB_SOURCES:.cc=.o)
|
||||||
|
$(AM_V_AR)rm -f $@
|
||||||
|
$(AM_V_at)$(AR) $(ARFLAGS) $@ $^
|
||||||
|
|
||||||
librocksdb_env_basic_test.a: env/env_basic_test.o $(LIBOBJECTS) $(TESTHARNESS)
|
librocksdb_env_basic_test.a: env/env_basic_test.o $(LIBOBJECTS) $(TESTHARNESS)
|
||||||
$(AM_V_AR)rm -f $@
|
$(AM_V_AR)rm -f $@
|
||||||
$(AM_V_at)$(AR) $(ARFLAGS) $@ $^
|
$(AM_V_at)$(AR) $(ARFLAGS) $@ $^
|
||||||
@ -1165,7 +1174,7 @@ memtablerep_bench: memtable/memtablerep_bench.o $(LIBOBJECTS) $(TESTUTIL)
|
|||||||
filter_bench: util/filter_bench.o $(LIBOBJECTS) $(TESTUTIL)
|
filter_bench: util/filter_bench.o $(LIBOBJECTS) $(TESTUTIL)
|
||||||
$(AM_LINK)
|
$(AM_LINK)
|
||||||
|
|
||||||
db_stress: tools/db_stress_tool.o tools/db_stress.o $(LIBOBJECTS) $(TESTUTIL)
|
db_stress: tools/db_stress.o $(STRESSTOOLOBJECTS)
|
||||||
$(AM_LINK)
|
$(AM_LINK)
|
||||||
|
|
||||||
write_stress: tools/write_stress.o $(LIBOBJECTS) $(TESTUTIL)
|
write_stress: tools/write_stress.o $(LIBOBJECTS) $(TESTUTIL)
|
||||||
@ -2038,7 +2047,7 @@ endif
|
|||||||
# Source files dependencies detection
|
# Source files dependencies detection
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
all_sources = $(LIB_SOURCES) $(MAIN_SOURCES) $(MOCK_LIB_SOURCES) $(TOOL_LIB_SOURCES) $(BENCH_LIB_SOURCES) $(TEST_LIB_SOURCES) $(ANALYZER_LIB_SOURCES)
|
all_sources = $(LIB_SOURCES) $(MAIN_SOURCES) $(MOCK_LIB_SOURCES) $(TOOL_LIB_SOURCES) $(BENCH_LIB_SOURCES) $(TEST_LIB_SOURCES) $(ANALYZER_LIB_SOURCES) $(STRESS_LIB_SOURCES)
|
||||||
DEPFILES = $(all_sources:.cc=.cc.d)
|
DEPFILES = $(all_sources:.cc=.cc.d)
|
||||||
|
|
||||||
# Add proper dependency support so changing a .h file forces a .cc file to
|
# Add proper dependency support so changing a .h file forces a .cc file to
|
||||||
|
28
TARGETS
28
TARGETS
@ -392,6 +392,24 @@ cpp_library(
|
|||||||
external_deps = ROCKSDB_EXTERNAL_DEPS,
|
external_deps = ROCKSDB_EXTERNAL_DEPS,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cpp_library(
|
||||||
|
name = "rocksdb_stress_lib",
|
||||||
|
srcs = [
|
||||||
|
"test_util/testutil.cc",
|
||||||
|
"tools/block_cache_analyzer/block_cache_trace_analyzer.cc",
|
||||||
|
"tools/db_stress_tool.cc",
|
||||||
|
"tools/trace_analyzer_tool.cc",
|
||||||
|
],
|
||||||
|
auto_headers = AutoHeaders.RECURSIVE_GLOB,
|
||||||
|
arch_preprocessor_flags = ROCKSDB_ARCH_PREPROCESSOR_FLAGS,
|
||||||
|
compiler_flags = ROCKSDB_COMPILER_FLAGS,
|
||||||
|
os_deps = ROCKSDB_OS_DEPS,
|
||||||
|
os_preprocessor_flags = ROCKSDB_OS_PREPROCESSOR_FLAGS,
|
||||||
|
preprocessor_flags = ROCKSDB_PREPROCESSOR_FLAGS,
|
||||||
|
deps = [":rocksdb_lib"],
|
||||||
|
external_deps = ROCKSDB_EXTERNAL_DEPS,
|
||||||
|
)
|
||||||
|
|
||||||
cpp_library(
|
cpp_library(
|
||||||
name = "env_basic_test_lib",
|
name = "env_basic_test_lib",
|
||||||
srcs = ["env/env_basic_test.cc"],
|
srcs = ["env/env_basic_test.cc"],
|
||||||
@ -758,15 +776,15 @@ ROCKS_TESTS = [
|
|||||||
[],
|
[],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"db_merge_operator_test",
|
"db_merge_operand_test",
|
||||||
"db/db_merge_operator_test.cc",
|
"db/db_merge_operand_test.cc",
|
||||||
"parallel",
|
"serial",
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"db_merge_operand_test",
|
"db_merge_operator_test",
|
||||||
"db/db_merge_operand_test.cc",
|
"db/db_merge_operator_test.cc",
|
||||||
"parallel",
|
"parallel",
|
||||||
[],
|
[],
|
||||||
[],
|
[],
|
||||||
|
@ -169,6 +169,13 @@ def generate_targets(repo_path, deps_map):
|
|||||||
src_mk.get("ANALYZER_LIB_SOURCES", []) +
|
src_mk.get("ANALYZER_LIB_SOURCES", []) +
|
||||||
["test_util/testutil.cc"],
|
["test_util/testutil.cc"],
|
||||||
[":rocksdb_lib"])
|
[":rocksdb_lib"])
|
||||||
|
# rocksdb_stress_lib
|
||||||
|
TARGETS.add_library(
|
||||||
|
"rocksdb_stress_lib",
|
||||||
|
src_mk.get("ANALYZER_LIB_SOURCES", [])
|
||||||
|
+ src_mk.get('STRESS_LIB_SOURCES', [])
|
||||||
|
+ ["test_util/testutil.cc"],
|
||||||
|
[":rocksdb_lib"])
|
||||||
|
|
||||||
print("Extra dependencies:\n{0}".format(str(deps_map)))
|
print("Extra dependencies:\n{0}".format(str(deps_map)))
|
||||||
# test for every test we found in the Makefile
|
# test for every test we found in the Makefile
|
||||||
|
4
src.mk
4
src.mk
@ -265,6 +265,9 @@ MOCK_LIB_SOURCES = \
|
|||||||
BENCH_LIB_SOURCES = \
|
BENCH_LIB_SOURCES = \
|
||||||
tools/db_bench_tool.cc \
|
tools/db_bench_tool.cc \
|
||||||
|
|
||||||
|
STRESS_LIB_SOURCES = \
|
||||||
|
tools/db_stress_tool.cc \
|
||||||
|
|
||||||
TEST_LIB_SOURCES = \
|
TEST_LIB_SOURCES = \
|
||||||
db/db_test_util.cc \
|
db/db_test_util.cc \
|
||||||
test_util/testharness.cc \
|
test_util/testharness.cc \
|
||||||
@ -396,6 +399,7 @@ MAIN_SOURCES = \
|
|||||||
tools/db_bench.cc \
|
tools/db_bench.cc \
|
||||||
tools/db_bench_tool_test.cc \
|
tools/db_bench_tool_test.cc \
|
||||||
tools/db_sanity_test.cc \
|
tools/db_sanity_test.cc \
|
||||||
|
tools/db_stress.cc \
|
||||||
tools/ldb_cmd_test.cc \
|
tools/ldb_cmd_test.cc \
|
||||||
tools/reduce_levels_test.cc \
|
tools/reduce_levels_test.cc \
|
||||||
tools/sst_dump_test.cc \
|
tools/sst_dump_test.cc \
|
||||||
|
Loading…
Reference in New Issue
Block a user