From 035857a31248b814cd22fde20934d6bb761e339f Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Tue, 26 Jan 2016 13:15:36 -0800 Subject: [PATCH] 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 --- db/db_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/db_test.cc b/db/db_test.cc index ef46f17fb9..5111c05ce7 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -169,6 +169,9 @@ TEST_F(DBTest, MockEnvTest) { delete db; } +// NewMemEnv returns nullptr in ROCKSDB_LITE since class InMemoryEnv isn't +// defined. +#ifndef ROCKSDB_LITE TEST_F(DBTest, MemEnvTest) { unique_ptr env{NewMemEnv(Env::Default())}; Options options; @@ -221,6 +224,7 @@ TEST_F(DBTest, MemEnvTest) { } delete db; } +#endif // ROCKSDB_LITE TEST_F(DBTest, WriteEmptyBatch) { Options options;