mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 16:30:56 +00:00
Fix RocksDB lite build
Summary: NewMemEnv() is defined in rocksdb lite but just returns nullptr -- would it be better to just not define it so we can catch issues like this at compile-time? Test Plan: $ make clean && OPT="-DTRAVIS -DROCKSDB_LITE" V=1 make -j32 db_test $ ./db_test --gtest_filter='DBTest.MemEnvTest' ... [ PASSED ] 0 tests. Reviewers: yhchiang, sdong Reviewed By: sdong Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D53427
This commit is contained in:
parent
77ef87ccb0
commit
035857a312
|
@ -169,6 +169,9 @@ TEST_F(DBTest, MockEnvTest) {
|
||||||
delete db;
|
delete db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewMemEnv returns nullptr in ROCKSDB_LITE since class InMemoryEnv isn't
|
||||||
|
// defined.
|
||||||
|
#ifndef ROCKSDB_LITE
|
||||||
TEST_F(DBTest, MemEnvTest) {
|
TEST_F(DBTest, MemEnvTest) {
|
||||||
unique_ptr<Env> env{NewMemEnv(Env::Default())};
|
unique_ptr<Env> env{NewMemEnv(Env::Default())};
|
||||||
Options options;
|
Options options;
|
||||||
|
@ -221,6 +224,7 @@ TEST_F(DBTest, MemEnvTest) {
|
||||||
}
|
}
|
||||||
delete db;
|
delete db;
|
||||||
}
|
}
|
||||||
|
#endif // ROCKSDB_LITE
|
||||||
|
|
||||||
TEST_F(DBTest, WriteEmptyBatch) {
|
TEST_F(DBTest, WriteEmptyBatch) {
|
||||||
Options options;
|
Options options;
|
||||||
|
|
Loading…
Reference in a new issue