mirror of https://github.com/facebook/rocksdb.git
Add KEEP_DB env var option
Summary: When debugging tests, it's useful to preserve the DB to investigate it and check the logs This will allow us to set KEEP_DB=1 to preserve the DB Closes https://github.com/facebook/rocksdb/pull/1759 Differential Revision: D4393826 Pulled By: IslamAbdelRahman fbshipit-source-id: 1bff689
This commit is contained in:
parent
77b4806625
commit
3ce091fd73
|
@ -72,7 +72,12 @@ DBTestBase::~DBTestBase() {
|
|||
options.db_paths.emplace_back(dbname_ + "_2", 0);
|
||||
options.db_paths.emplace_back(dbname_ + "_3", 0);
|
||||
options.db_paths.emplace_back(dbname_ + "_4", 0);
|
||||
EXPECT_OK(DestroyDB(dbname_, options));
|
||||
|
||||
if (getenv("KEEP_DB")) {
|
||||
printf("DB is still at %s\n", dbname_.c_str());
|
||||
} else {
|
||||
EXPECT_OK(DestroyDB(dbname_, options));
|
||||
}
|
||||
delete env_;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue