Browse Source

[2851] disable tests relying on mapped segment if --without-shared-memory

JINMEI Tatuya 12 years ago
parent
commit
9377868e58

+ 8 - 1
src/bin/auth/tests/datasrc_clients_builder_unittest.cc

@@ -535,7 +535,14 @@ TEST_F(DataSrcClientsBuilderTest, loadZoneInvalidParams) {
 // This works only if mapped memory segment is compiled.
 // Note also that this test case may fail as we make b10-auth more aware
 // of shared-memory cache.
-TEST_F(DataSrcClientsBuilderTest, loadInNonWritableCache) {
+TEST_F(DataSrcClientsBuilderTest,
+#ifdef USE_SHARED_MEMORY
+       loadInNonWritableCache
+#else
+       DISABLED_loadInNonWritableCache
+#endif
+    )
+{
     const ConstElementPtr config = Element::fromJSON(
         "{"
         "\"IN\": [{"

+ 9 - 1
src/lib/datasrc/tests/client_list_unittest.cc

@@ -714,7 +714,15 @@ TEST_F(ListTest, badCache) {
     checkDS(0, "test_type", "[\"example.org\"]", true);
 }
 
-TEST_F(ListTest, cacheInReadOnlySegment) {
+// This test relies on the property of mapped type of cache.
+TEST_F(ListTest,
+#ifdef USE_SHARED_MEMORY
+       cacheInReadOnlySegment
+#else
+       DISABLED_cacheInReadOnlySegment
+#endif
+    )
+{
     // Initializing data source with read-only zone table memory segment
     // is possible.  Loading is just postponed
     const ConstElementPtr elem(Element::fromJSON("["