]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Only build death tests on platforms that support them 830/head
authorAlan Somers <asomers@gmail.com>
Fri, 11 Oct 2013 20:45:47 +0000 (13:45 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Wed, 6 Nov 2013 22:08:36 +0000 (14:08 -0800)
googletest does not support death tests on FreeBSD.  I've submitted a
patch upstream that trivially enables support, but in the meantime we
can't compile death tests for Ceph on FreeBSD.

https://groups.google.com/forum/#!topic/googletestframework/tjY6UjWgNOw

Signed-off-by: Alan Somers <asomers@gmail.com>
src/test/ceph_crypto.cc
src/test/os/TestFlatIndex.cc

index 2c934fa848c3cc48b680c4700c78019df5206793..11d410182a4d60469229476fe69e955ef4a1c77a 100644 (file)
@@ -135,6 +135,8 @@ void do_simple_crypto() {
   exit(0);
 }
 
+#if GTEST_HAS_DEATH_TEST
 TEST_F(ForkDeathTest, MD5) {
   ASSERT_EXIT(do_simple_crypto(), ::testing::ExitedWithCode(0), "^$");
 }
+#endif //GTEST_HAS_DEATH_TEST
index 53d2bbe63767c5813e3a03e2a55d1145a0ec474d..1326bc663772eb57b80e0cad35c483e95eae6d25 100644 (file)
@@ -41,6 +41,7 @@ TEST(FlatIndex, FlatIndex) {
   EXPECT_EQ(0, index.cleanup());
 }
 
+#ifdef GTEST_HAS_DEATH_TEST
 TEST(FlatIndex, collection) {
   coll_t collection("ABC");
   const std::string base_path("PATH");
@@ -53,6 +54,7 @@ TEST(FlatIndex, collection) {
   vector<ghobject_t> ls;
   ASSERT_DEATH(index.collection_list_partial(hoid, 0, 0, 0, &ls, &hoid), "0");
 }
+#endif //GTEST_HAS_DEATH_TEST
 
 TEST(FlatIndex, created_unlink) {
   coll_t collection("ABC");