Browse Source

[2836] Disable tests without shared memory

Disable tests using the shared memory utilities (eg. mapped segment)
when there's no shared memory support.
Michal 'vorner' Vaner 12 years ago
parent
commit
bd04d06c2d

+ 4 - 0
src/lib/datasrc/tests/memory/segment_object_holder_unittest.cc

@@ -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

+ 2 - 0
src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc

@@ -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.