]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2836] Disable tests without shared memory
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Mon, 13 May 2013 12:10:17 +0000 (14:10 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Mon, 13 May 2013 12:10:17 +0000 (14:10 +0200)
Disable tests using the shared memory utilities (eg. mapped segment)
when there's no shared memory support.

src/lib/datasrc/tests/memory/segment_object_holder_unittest.cc
src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc

index 1c21766371f585aecf18e9d71a4ae3d8c44f4fba..70d331e08c9648d53a7d0469435c2077b982c902 100644 (file)
@@ -88,7 +88,11 @@ allocateUntilGrows(MemorySegment& segment, size_t& current_size) {
 
 // Check that the segment thing releases stuff even in case it throws
 // SegmentGrown exception and the thing moves address
+#ifdef USE_SHARED_MEMORY
 TEST(SegmentObjectHolderTest, grow) {
+#else
+TEST(SegmentObjectHolderTest, DISABLED_grow) {
+#endif
     MemorySegmentMapped segment(mapped_file,
                                 isc::util::MemorySegmentMapped::CREATE_ONLY);
     // Allocate a bit of memory, to get a unique address
index 016df0d14cd0a54fa3a4e8dffff108ab5ceeb6a6..ed677d2e2f5f797e94cfbc886a5e242e8ef71d09 100644 (file)
@@ -163,6 +163,7 @@ private:
     const size_t initial_size_;
 };
 
+#ifdef USE_SHARED_MEMORY
 // There should be no initialization fiasco there. We only set int value inside
 // and don't use it until the create() is called.
 MappedSegmentCreator small_creator(4092), default_creator;
@@ -170,6 +171,7 @@ MappedSegmentCreator small_creator(4092), default_creator;
 INSTANTIATE_TEST_CASE_P(MappedSegment, ZoneDataUpdaterTest, ::testing::Values(
                             static_cast<SegmentCreator*>(&small_creator),
                             static_cast<SegmentCreator*>(&default_creator)));
+#endif
 
 TEST_P(ZoneDataUpdaterTest, bothNull) {
     // At least either covered RRset or RRSIG must be non NULL.