From f652bb663f0499f5447d0358670464a669a199f0 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Tue, 13 Sep 2011 22:42:02 -0700 Subject: [PATCH] Fix test cases that did not work if memcached was not available. --- libtest/test.cc | 1 - tests/include.am | 4 ---- tests/memcapable.cc | 6 ++++++ tests/memslap.cc | 6 ++++++ 4 files changed, 12 insertions(+), 5 deletions(-) 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)) { -- 2.30.2