From: Brian Aker Date: Wed, 14 Sep 2011 05:42:02 +0000 (-0700) Subject: Fix test cases that did not work if memcached was not available. X-Git-Tag: 0.53~17 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f652bb663f0499f5447d0358670464a669a199f0;p=awesomized%2Flibmemcached Fix test cases that did not work if memcached was not available. --- diff --git a/libtest/test.cc b/libtest/test.cc index b7f58442..432d8417 100644 --- a/libtest/test.cc +++ b/libtest/test.cc @@ -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; } diff --git a/tests/include.am b/tests/include.am index 38a07f99..41cf16df 100644 --- a/tests/include.am +++ b/tests/include.am @@ -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 diff --git a/tests/memcapable.cc b/tests/memcapable.cc index 65db1698..7adf7635 100644 --- a/tests/memcapable.cc +++ b/tests/memcapable.cc @@ -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)) { diff --git a/tests/memslap.cc b/tests/memslap.cc index 544ed280..5063c559 100644 --- a/tests/memslap.cc +++ b/tests/memslap.cc @@ -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)) {