Fix test cases that did not work if memcached was not available.
authorBrian Aker <brian@tangent.org>
Wed, 14 Sep 2011 05:42:02 +0000 (22:42 -0700)
committerBrian Aker <brian@tangent.org>
Wed, 14 Sep 2011 05:42:02 +0000 (22:42 -0700)
libtest/test.cc
tests/include.am
tests/memcapable.cc
tests/memslap.cc

index b7f584421276443b9f8b9a2d206b029ffb6df232..432d84176118d1aafc0da8d7e24393429b655e07 100644 (file)
@@ -139,7 +139,6 @@ int main(int argc, char *argv[])
   case TEST_FATAL:
   case TEST_FAILURE:
   case TEST_MEMORY_ALLOCATION_FAILURE:
-    Error << argv[0] << " failed in Framework::create()";
     delete world;
     return EXIT_FAILURE;
   }
index 38a07f9912bcb230e43e992913d501a82a8675fc..41cf16dfc867b8983db9ffa99bffb9b37401ce2f 100644 (file)
@@ -313,10 +313,6 @@ test-mem: tests/var tests/testapp
 test-sasl: tests/sasl
        @tests/sasl
 
-
-test-udp: tests/var tests/testudp
-       @tests/testudp
-
 test-atom: tests/var tests/atomsmasher
        @tests/atomsmasher
 
index 65db1698fd1ee8cf41606bd897aa310382361615..7adf763561a11c134ba5b20119e5553f7049ac47 100644 (file)
@@ -96,6 +96,12 @@ collection_st collection[] ={
 
 static void *world_create(server_startup_st& servers, test_return_t& error)
 {
+  if (HAVE_MEMCACHED_BINARY == 0)
+  {
+    error= TEST_FATAL;
+    return NULL;
+  }
+
   const char *argv[1]= { "memcapable" };
   if (not server_startup(servers, "memcached", MEMCACHED_DEFAULT_PORT +10, 1, argv))
   {
index 544ed2802e0cdf1178ac2cb6dd9d1117abf77485..5063c559402579bdfd3e749d2a94113a82868ec8 100644 (file)
@@ -149,6 +149,12 @@ collection_st collection[] ={
 
 static void *world_create(server_startup_st& servers, test_return_t& error)
 {
+  if (HAVE_MEMCACHED_BINARY == 0)
+  {
+    error= TEST_FATAL;
+    return NULL;
+  }
+
   const char *argv[1]= { "memslap" };
   if (not server_startup(servers, "memcached", MEMCACHED_DEFAULT_PORT +10, 1, argv))
   {