Move AddFile() tests to external_sst_file_test.cc
Summary: Simply move the tests Test Plan: make check -j64 Reviewers: andrewkr, lightmark, yiwu, yhchiang, kradhakrishnan, sdong Reviewed By: sdong Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D62529
This commit is contained in:
parent
66a91e2607
commit
52ee07b021
@ -370,6 +370,7 @@ set(TESTS
|
|||||||
db/db_flush_test.cc
|
db/db_flush_test.cc
|
||||||
db/db_iterator_test.cc
|
db/db_iterator_test.cc
|
||||||
db/db_sst_test.cc
|
db/db_sst_test.cc
|
||||||
|
db/external_sst_file_test.cc
|
||||||
db/db_universal_compaction_test.cc
|
db/db_universal_compaction_test.cc
|
||||||
db/db_wal_test.cc
|
db/db_wal_test.cc
|
||||||
db/dbformat_test.cc
|
db/dbformat_test.cc
|
||||||
|
5
Makefile
5
Makefile
@ -285,6 +285,7 @@ TESTS = \
|
|||||||
db_iterator_test \
|
db_iterator_test \
|
||||||
db_options_test \
|
db_options_test \
|
||||||
db_sst_test \
|
db_sst_test \
|
||||||
|
external_sst_file_test \
|
||||||
db_tailing_iter_test \
|
db_tailing_iter_test \
|
||||||
db_universal_compaction_test \
|
db_universal_compaction_test \
|
||||||
db_wal_test \
|
db_wal_test \
|
||||||
@ -392,6 +393,7 @@ PARALLEL_TEST = \
|
|||||||
db_compaction_filter_test \
|
db_compaction_filter_test \
|
||||||
db_compaction_test \
|
db_compaction_test \
|
||||||
db_sst_test \
|
db_sst_test \
|
||||||
|
external_sst_file_test \
|
||||||
db_test \
|
db_test \
|
||||||
db_universal_compaction_test \
|
db_universal_compaction_test \
|
||||||
fault_injection_test \
|
fault_injection_test \
|
||||||
@ -961,6 +963,9 @@ db_options_test: db/db_options_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARN
|
|||||||
db_sst_test: db/db_sst_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
|
db_sst_test: db/db_sst_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
|
||||||
$(AM_LINK)
|
$(AM_LINK)
|
||||||
|
|
||||||
|
external_sst_file_test: db/external_sst_file_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
|
||||||
|
$(AM_LINK)
|
||||||
|
|
||||||
db_tailing_iter_test: db/db_tailing_iter_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
|
db_tailing_iter_test: db/db_tailing_iter_test.o db/db_test_util.o $(LIBOBJECTS) $(TESTHARNESS)
|
||||||
$(AM_LINK)
|
$(AM_LINK)
|
||||||
|
|
||||||
|
1238
db/db_sst_test.cc
1238
db/db_sst_test.cc
File diff suppressed because it is too large
Load Diff
1178
db/external_sst_file_test.cc
Normal file
1178
db/external_sst_file_test.cc
Normal file
File diff suppressed because it is too large
Load Diff
11
src.mk
11
src.mk
@ -221,18 +221,19 @@ MAIN_SOURCES = \
|
|||||||
db/dbformat_test.cc \
|
db/dbformat_test.cc \
|
||||||
db/db_iter_test.cc \
|
db/db_iter_test.cc \
|
||||||
db/db_test.cc \
|
db/db_test.cc \
|
||||||
db/db_block_cache_test.cc \
|
db/db_block_cache_test.cc \
|
||||||
db/db_io_failure_test.cc \
|
db/db_io_failure_test.cc \
|
||||||
db/db_bloom_filter_test.cc \
|
db/db_bloom_filter_test.cc \
|
||||||
db/db_compaction_filter_test.cc \
|
db/db_compaction_filter_test.cc \
|
||||||
db/db_compaction_test.cc \
|
db/db_compaction_test.cc \
|
||||||
db/db_dynamic_level_test.cc \
|
db/db_dynamic_level_test.cc \
|
||||||
db/db_flush_test.cc \
|
db/db_flush_test.cc \
|
||||||
db/db_inplace_update_test.cc \
|
db/db_inplace_update_test.cc \
|
||||||
db/db_iterator_test.cc \
|
db/db_iterator_test.cc \
|
||||||
db/db_log_iter_test.cc \
|
db/db_log_iter_test.cc \
|
||||||
db/db_options_test.cc \
|
db/db_options_test.cc \
|
||||||
db/db_sst_test.cc \
|
db/db_sst_test.cc \
|
||||||
|
db/external_sst_file_test.cc \
|
||||||
db/db_tailing_iter_test.cc \
|
db/db_tailing_iter_test.cc \
|
||||||
db/db_universal_compaction_test.cc \
|
db/db_universal_compaction_test.cc \
|
||||||
db/db_wal_test.cc \
|
db/db_wal_test.cc \
|
||||||
|
@ -359,5 +359,30 @@ void RandomInitCFOptions(ColumnFamilyOptions* cf_opt, Random* rnd) {
|
|||||||
&cf_opt->compression_per_level, rnd);
|
&cf_opt->compression_per_level, rnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status DestroyDir(Env* env, const std::string& dir) {
|
||||||
|
Status s;
|
||||||
|
if (env->FileExists(dir).IsNotFound()) {
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
std::vector<std::string> files_in_dir;
|
||||||
|
s = env->GetChildren(dir, &files_in_dir);
|
||||||
|
if (s.ok()) {
|
||||||
|
for (auto& file_in_dir : files_in_dir) {
|
||||||
|
if (file_in_dir == "." || file_in_dir == "..") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
s = env->DeleteFile(dir + "/" + file_in_dir);
|
||||||
|
if (!s.ok()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s.ok()) {
|
||||||
|
s = env->DeleteDir(dir);
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
@ -691,5 +691,7 @@ TableFactory* RandomTableFactory(Random* rnd, int pre_defined = -1);
|
|||||||
|
|
||||||
std::string RandomName(Random* rnd, const size_t len);
|
std::string RandomName(Random* rnd, const size_t len);
|
||||||
|
|
||||||
|
Status DestroyDir(Env* env, const std::string& dir);
|
||||||
|
|
||||||
} // namespace test
|
} // namespace test
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
Loading…
Reference in New Issue
Block a user