From: Alan Somers Date: Fri, 11 Oct 2013 20:45:47 +0000 (-0700) Subject: test: Only build death tests on platforms that support them X-Git-Tag: v0.73~22^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d030d1ed92c27e33d4ed49eb292b65f69f88917;p=ceph.git test: Only build death tests on platforms that support them 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 --- diff --git a/src/test/ceph_crypto.cc b/src/test/ceph_crypto.cc index 2c934fa848c..11d410182a4 100644 --- a/src/test/ceph_crypto.cc +++ b/src/test/ceph_crypto.cc @@ -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 diff --git a/src/test/os/TestFlatIndex.cc b/src/test/os/TestFlatIndex.cc index 53d2bbe6376..1326bc66377 100644 --- a/src/test/os/TestFlatIndex.cc +++ b/src/test/os/TestFlatIndex.cc @@ -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 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");