]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/objectstore/store_test_fixture.h
Import ceph 15.2.8
[ceph.git] / ceph / src / test / objectstore / store_test_fixture.h
index d816dbdf49de7a71783c96d5670c0363e65e10c2..40e62778cdb5c665ad27939b53128c0a5b458cd4 100644 (file)
@@ -13,6 +13,8 @@ class StoreTestFixture : virtual public ::testing::Test {
   std::stack<std::pair<std::string, std::string>> saved_settings;
   ConfigProxy* conf = nullptr;
 
+  std::string orig_death_test_style;
+
 public:
   boost::scoped_ptr<ObjectStore> store;
   ObjectStore::CollectionHandle ch;
@@ -23,6 +25,13 @@ public:
 
   void SetUp() override;
   void TearDown() override;
+  void SetDeathTestStyle(const char* new_style) {
+    if (orig_death_test_style.empty()) {
+      orig_death_test_style = ::testing::FLAGS_gtest_death_test_style;
+    }
+    ::testing::FLAGS_gtest_death_test_style = new_style;
+  }
+
   void SetVal(ConfigProxy& conf, const char* key, const char* val);
   struct SettingsBookmark {
     StoreTestFixture& s;