Commit ac01dfd0 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2836] Conditional code compilation

Skip some code if no shared memory support is present.
parent 61e6c39d
......@@ -17,7 +17,9 @@
#include <datasrc/memory/segment_object_holder.h>
#ifdef USE_SHARED_MEMORY
#include <boost/interprocess/managed_mapped_file.hpp>
#endif
#include <gtest/gtest.h>
......@@ -103,9 +105,6 @@ allocateUntilGrows(MemorySegment& segment, size_t& current_size) {
// 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
......@@ -137,5 +136,6 @@ TEST(SegmentObjectHolderTest, DISABLED_grow) {
// Remove the file
EXPECT_EQ(0, unlink(mapped_file));
}
#endif
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment