Update tests per bug 912408, so that if memcached is not available they will SKIP...
authorBrian Aker <brian@tangent.org>
Sat, 7 Jan 2012 22:16:36 +0000 (14:16 -0800)
committerBrian Aker <brian@tangent.org>
Sat, 7 Jan 2012 22:16:36 +0000 (14:16 -0800)
13 files changed:
tests/cli.am [new file with mode: 0644]
tests/include.am
tests/libmemcached_world.h
tests/memcapable.cc
tests/memcat.cc
tests/memcp.cc
tests/memdump.cc
tests/memexist.cc
tests/memflush.cc
tests/memrm.cc
tests/memslap.cc
tests/memstat.cc
tests/memtouch.cc

diff --git a/tests/cli.am b/tests/cli.am
new file mode 100644 (file)
index 0000000..9e47fdd
--- /dev/null
@@ -0,0 +1,146 @@
+# vim:ft=automake
+# Copyright (C) 2012 Data Differential
+# All rights reserved.
+#
+# Use and distribution licensed under the BSD license.  See
+# the COPYING file in the parent directory for full text.
+#
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+
+tests_memcapable_SOURCES= tests/memcapable.cc
+tests_memcapable_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memcapable_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memcapable
+tests_memcapable_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memcapable
+noinst_PROGRAMS+= tests/memcapable
+
+tests_memstat_SOURCES= tests/memstat.cc
+tests_memstat_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memstat_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memstat
+tests_memstat_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memstat
+noinst_PROGRAMS+= tests/memstat
+
+tests_memcp_SOURCES= tests/memcp.cc
+tests_memcp_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memcp_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memcp
+tests_memcp_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memcp
+noinst_PROGRAMS+= tests/memcp
+
+tests_memflush_SOURCES= tests/memflush.cc
+tests_memflush_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memflush_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memflush
+tests_memflush_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memflush
+noinst_PROGRAMS+= tests/memflush
+
+tests_memrm_SOURCES= tests/memrm.cc
+tests_memrm_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memrm_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memrm
+tests_memrm_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memrm
+noinst_PROGRAMS+= tests/memrm
+
+tests_memexist_SOURCES= tests/memexist.cc
+tests_memexist_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memexist_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memexist
+tests_memexist_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memexist
+noinst_PROGRAMS+= tests/memexist
+
+tests_memtouch_SOURCES= tests/memtouch.cc
+tests_memtouch_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memtouch_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memtouch
+tests_memtouch_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memtouch
+noinst_PROGRAMS+= tests/memtouch
+
+tests_memcat_SOURCES= tests/memcat.cc
+tests_memcat_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memcat_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memcat
+tests_memcat_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memcat
+noinst_PROGRAMS+= tests/memcat
+
+tests_memerror_SOURCES= tests/memerror.cc
+tests_memerror_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memerror_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memerror
+tests_memerror_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memerror
+noinst_PROGRAMS+= tests/memerror
+
+tests_memslap_SOURCES= tests/memslap.cc
+tests_memslap_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memslap_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memslap
+tests_memslap_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memslap
+noinst_PROGRAMS+= tests/memslap
+
+tests_memdump_SOURCES= tests/memdump.cc
+tests_memdump_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_memdump_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memdump
+tests_memdump_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memdump
+noinst_PROGRAMS+= tests/memdump
+
+test-memcp: clients/memcp
+       @echo "Testing memcp"
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+valgrind-memcp: clients/memcat clients/memcp
+       @echo "Testing memcp"
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+test-memflush: clients/memflush
+       @echo "Testing memflush"
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @clients/memflush --servers="localhost:12555"
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+valgrind-memflush: clients/memflush
+       @echo "Testing memflush"
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555"
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+test-memdump: clients/memdump clients/memcp
+       @echo "Testing memdump"
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @clients/memcp --servers="localhost:12555" clients/memcat
+       @clients/memdump --servers="localhost:12555" > /dev/null
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+valgrind-memdump: clients/memcat clients/memcp
+       @echo "Testing memdump"
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @clients/memcp --servers="localhost:12555" clients/memcat
+       @$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+test-memstat: clients/memstat
+       @echo "Testing memstat"
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @clients/memstat --servers="localhost:12555" > /dev/null
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
+valgrind-memstat: clients/memstat
+       @echo "Testing memstat"
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null
+       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
+       @rm tests/Xumemc.pid
+
index 23f0f89916e18d8cbb88b4b64fb9fb7874a38d0e..bfdb36b882a94f7f47d39f309a6575547b18fa11 100644 (file)
@@ -59,82 +59,7 @@ tests_hash_plus_LDADD= $(tests_testhashkit_DEPENDENCIES)
 check_PROGRAMS+= tests/hash_plus
 noinst_PROGRAMS+= tests/hash_plus
 
-tests_memcapable_SOURCES= tests/memcapable.cc
-tests_memcapable_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memcapable_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memcapable
-tests_memcapable_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memcapable
-noinst_PROGRAMS+= tests/memcapable
-
-tests_memstat_SOURCES= tests/memstat.cc
-tests_memstat_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memstat_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memstat
-tests_memstat_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memstat
-noinst_PROGRAMS+= tests/memstat
-
-tests_memcp_SOURCES= tests/memcp.cc
-tests_memcp_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memcp_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memcp
-tests_memcp_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memcp
-noinst_PROGRAMS+= tests/memcp
-
-tests_memflush_SOURCES= tests/memflush.cc
-tests_memflush_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memflush_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memflush
-tests_memflush_LDADD= libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memflush
-noinst_PROGRAMS+= tests/memflush
-
-tests_memrm_SOURCES= tests/memrm.cc
-tests_memrm_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memrm_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memrm
-tests_memrm_LDADD= libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memrm
-noinst_PROGRAMS+= tests/memrm
-
-tests_memexist_SOURCES= tests/memexist.cc
-tests_memexist_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memexist_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memexist
-tests_memexist_LDADD= libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memexist
-noinst_PROGRAMS+= tests/memexist
-
-tests_memtouch_SOURCES= tests/memtouch.cc
-tests_memtouch_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memtouch_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memtouch
-tests_memtouch_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memtouch
-noinst_PROGRAMS+= tests/memtouch
-
-tests_memcat_SOURCES= tests/memcat.cc
-tests_memcat_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memcat_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memcat
-tests_memcat_LDADD= libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memcat
-noinst_PROGRAMS+= tests/memcat
-
-tests_memerror_SOURCES= tests/memerror.cc
-tests_memerror_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memerror_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memerror
-tests_memerror_LDADD= libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memerror
-noinst_PROGRAMS+= tests/memerror
-
-tests_memslap_SOURCES= tests/memslap.cc
-tests_memslap_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memslap_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memslap
-tests_memslap_LDADD= libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memslap
-noinst_PROGRAMS+= tests/memslap
-
-tests_memdump_SOURCES= tests/memdump.cc
-tests_memdump_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memdump_DEPENDENCIES= libtest/libtest.la $(TESTS_LDADDS) clients/memdump
-tests_memdump_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
-check_PROGRAMS+= tests/memdump
-noinst_PROGRAMS+= tests/memdump
+include tests/cli.am
 
 test: check
 
@@ -144,64 +69,6 @@ check-local: $(TEST_DOCS)
 test-x: test-plus test-memcp test-memdump test-memflush test-memstat
        @echo "Tests completed"
 
-test-memcp: clients/memcp
-       @echo "Testing memcp"
-       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-valgrind-memcp: clients/memcat clients/memcp
-       @echo "Testing memcp"
-       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-test-memflush: clients/memflush
-       @echo "Testing memflush"
-       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @clients/memflush --servers="localhost:12555"
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-valgrind-memflush: clients/memflush
-       @echo "Testing memflush"
-       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555"
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-test-memdump: clients/memdump clients/memcp
-       @echo "Testing memdump"
-       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @clients/memcp --servers="localhost:12555" clients/memcat
-       @clients/memdump --servers="localhost:12555" > /dev/null
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-valgrind-memdump: clients/memcat clients/memcp
-       @echo "Testing memdump"
-       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @clients/memcp --servers="localhost:12555" clients/memcat
-       @$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-test-memstat: clients/memstat
-       @echo "Testing memstat"
-       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @clients/memstat --servers="localhost:12555" > /dev/null
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
-valgrind-memstat: clients/memstat
-       @echo "Testing memstat"
-       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-       @$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null
-       @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-       @rm tests/Xumemc.pid
-
 test-mem: tests/var tests/libmemcached-1.0/testapp
        @tests/libmemcached-1.0/testapp
 
index ad55d17c600ed89e04187f753fc760d05dc13fdf..824aabe751adfa503384f780d83233d404f81db1 100644 (file)
@@ -31,7 +31,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 60fd00ada4820c0d68080279439a30045cfa11c0..c8adad18153a5dabde1ea04a795ed0cec95f0b4e 100644 (file)
@@ -105,7 +105,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index e8ed3efcb59346a6cc7f23fefff25060db4cbaac..ea64352eea809672a5fa74a8fac73e6c160c4e86 100644 (file)
@@ -136,7 +136,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index c22c4db7db55f28505c834641420e0ae1a7a1095..a929b6db5a438aff9ee0aed323277eabffd1d811 100644 (file)
@@ -94,7 +94,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 6e5a2aed8173df1d18e8226e5b875fc9eaaec3aa..0aeb0a99b82a908243b36b4e47f6f3870c65cf50 100644 (file)
@@ -121,7 +121,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 00fc3abf0da64eb9b68942b0f5e7f6e54fb03789..9de01fa36ef657dc3a3b58c6ff90eca29a4a64f3 100644 (file)
@@ -136,7 +136,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 8f91356c2b4714320decdfea9296fc9478ec1e81..6cafcbbab31894f19438110df62cd7af2b9a1162 100644 (file)
@@ -94,7 +94,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index bf2dc86a9235ca0902d121dcf914fd3334294b08..f3a1f84bc3ed105cae57c2cfb667957ba94a4e24 100644 (file)
@@ -134,7 +134,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 229a920cd27ff7ba197e84a72330270f78ede60c..21d66c5937672d8421bb02ff9fd44b01b8e047c8 100644 (file)
@@ -160,7 +160,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 44bc77aaf3f67331e3e74f35fb94afc969cd0dc0..ec7dd4f88cd6d30de2d2040236367e7ab431a30b 100644 (file)
@@ -107,7 +107,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }
 
index 21378d73833b4261385bec626cb6552d72736941..2710cb6c19856707e58da1c3d083dd2353c2daf1 100644 (file)
@@ -130,7 +130,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error)
 {
   if (HAVE_MEMCACHED_BINARY == 0)
   {
-    error= TEST_FATAL;
+    error= TEST_SKIPPED;
     return NULL;
   }