Skip to content

Commit

Permalink
Fix TARGETS file tests list
Browse files Browse the repository at this point in the history
Summary:
1. The buckifier script assume each test "foo" comes with a .cc file of the same name (i.e. foo.cc). Update cassandra tests to follow this pattern so that the buckifier script can recognize them.
2. add blob_db_test
Closes facebook#2506

Differential Revision: D5331517

Pulled By: yiwu-arbug

fbshipit-source-id: 86f3eba471fc621186ab44cbd073b6162cde8e57
  • Loading branch information
Yi Wu authored and facebook-github-bot committed Jun 27, 2017
1 parent b49b371 commit 982cec2
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 148 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,9 @@ set(TESTS
utilities/lua/rocks_lua_test.cc
utilities/memory/memory_test.cc
utilities/merge_operators/cassandra/cassandra_merge_test.cc
utilities/merge_operators/cassandra/format_test.cc
utilities/merge_operators/cassandra/row_merge_test.cc
utilities/merge_operators/cassandra/serialize_test.cc
utilities/merge_operators/cassandra/cassandra_format_test.cc
utilities/merge_operators/cassandra/cassandra_row_merge_test.cc
utilities/merge_operators/cassandra/cassandra_serialize_test.cc
utilities/merge_operators/string_append/stringappend_test.cc
utilities/object_registry_test.cc
utilities/option_change_migration/option_change_migration_test.cc
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ TESTS = \
db_statistics_test \
db_write_test \
autovector_test \
blob_db_test \
cleanable_test \
column_family_test \
table_properties_collector_test \
Expand Down Expand Up @@ -995,16 +996,16 @@ option_change_migration_test: utilities/option_change_migration/option_change_mi
stringappend_test: utilities/merge_operators/string_append/stringappend_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

cassandra_format_test: utilities/merge_operators/cassandra/format_test.o $(LIBOBJECTS) $(TESTHARNESS)
cassandra_format_test: utilities/merge_operators/cassandra/cassandra_format_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

cassandra_merge_test: utilities/merge_operators/cassandra/cassandra_merge_test.o utilities/merge_operators/cassandra/test_utils.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

cassandra_row_merge_test: utilities/merge_operators/cassandra/row_merge_test.o utilities/merge_operators/cassandra/test_utils.o $(LIBOBJECTS) $(TESTHARNESS)
cassandra_row_merge_test: utilities/merge_operators/cassandra/cassandra_row_merge_test.o utilities/merge_operators/cassandra/test_utils.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

cassandra_serialize_test: utilities/merge_operators/cassandra/serialize_test.o $(LIBOBJECTS) $(TESTHARNESS)
cassandra_serialize_test: utilities/merge_operators/cassandra/cassandra_serialize_test.o $(LIBOBJECTS) $(TESTHARNESS)
$(AM_LINK)

redis_test: utilities/redis/redis_lists_test.o $(LIBOBJECTS) $(TESTHARNESS)
Expand Down
279 changes: 145 additions & 134 deletions TARGETS

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions buckifier/buckify_rocksdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_tests(repo_path):
else:
# we consumed all the parallel tests
break

return tests


Expand Down Expand Up @@ -122,7 +122,7 @@ def generate_targets(repo_path):
[":rocksdb_lib"])

# test for every test we found in the Makefile
for test in tests:
for test in sorted(tests):
match_src = [src for src in cc_files if ("/%s.c" % test) in src]
if len(match_src) == 0:
print(ColorString.warning("Cannot find .cc file for %s" % test))
Expand Down
13 changes: 7 additions & 6 deletions src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ EXP_LIB_SOURCES = \
TEST_LIB_SOURCES = \
util/testharness.cc \
util/testutil.cc \
db/db_test_util.cc
db/db_test_util.cc \
utilities/merge_operators/cassandra/test_utils.cc \

MAIN_SOURCES = \
cache/cache_bench.cc \
Expand Down Expand Up @@ -323,7 +324,7 @@ MAIN_SOURCES = \
util/log_write_bench.cc \
util/rate_limiter_test.cc \
util/slice_transform_test.cc \
util/timer_queue_test.cc \
util/timer_queue_test.cc \
util/thread_list_test.cc \
util/thread_local_test.cc \
utilities/backupable/backupable_db_test.cc \
Expand All @@ -340,11 +341,11 @@ MAIN_SOURCES = \
utilities/merge_operators/string_append/stringappend_test.cc \
utilities/merge_operators/cassandra/cassandra_merge_test.cc \
utilities/merge_operators/cassandra/test_utils.cc \
utilities/merge_operators/cassandra/format_test.cc \
utilities/merge_operators/cassandra/row_merge_test.cc \
utilities/merge_operators/cassandra/serialize_test.cc \
utilities/merge_operators/cassandra/cassandra_format_test.cc \
utilities/merge_operators/cassandra/cassandra_row_merge_test.cc \
utilities/merge_operators/cassandra/cassandra_serialize_test.cc \
utilities/object_registry_test.cc \
utilities/option_change_migration/option_change_migration_test.cc \
utilities/option_change_migration/option_change_migration_test.cc \
utilities/options/options_util_test.cc \
utilities/redis/redis_lists_test.cc \
utilities/simulator_cache/sim_cache_test.cc \
Expand Down

0 comments on commit 982cec2

Please sign in to comment.