X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=libtest%2Funittest.cc;h=3833a5bd7206bf6f7c69c11b95d25e285fd9cc01;hb=77e79fb2056c9a177a670da48178fd1ac051d33d;hp=93192a255b17d7ba82dbd560458dc4d96f404436;hpb=27ee6d2aea6210eaca004475600aba78b7170883;p=m6w6%2Flibmemcached diff --git a/libtest/unittest.cc b/libtest/unittest.cc index 93192a25..3833a5bd 100644 --- a/libtest/unittest.cc +++ b/libtest/unittest.cc @@ -64,7 +64,9 @@ static test_return_t GDB_COMMAND_test(void *) static test_return_t test_success_equals_one_test(void *) { test_skip(HAVE_LIBMEMCACHED, true); +#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED test_zero(MEMCACHED_SUCCESS); +#endif return TEST_SUCCESS; } @@ -206,7 +208,9 @@ static test_return_t _compare_test_return_t_test(void *) static test_return_t _compare_memcached_return_t_test(void *) { test_skip(HAVE_LIBMEMCACHED, true); +#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED test_compare(MEMCACHED_SUCCESS, MEMCACHED_SUCCESS); +#endif return TEST_SUCCESS; } @@ -214,6 +218,9 @@ static test_return_t _compare_memcached_return_t_test(void *) static test_return_t _compare_gearman_return_t_test(void *) { test_skip(HAVE_LIBGEARMAN, true); +#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN + test_compare(GEARMAN_SUCCESS, GEARMAN_SUCCESS); +#endif return TEST_SUCCESS; } @@ -223,8 +230,9 @@ static test_return_t gearmand_cycle_test(void *object) server_startup_st *servers= (server_startup_st*)object; test_true(servers); - if (HAVE_LIBGEARMAN) + if (HAVE_LIBGEARMAN and GEARMAND_BINARY) { + test_true(has_gearmand_binary()); const char *argv[1]= { "cycle_gearmand" }; test_true(server_startup(*servers, "gearmand", 9999, 1, argv)); @@ -241,6 +249,7 @@ static test_return_t memcached_cycle_test(void *object) if (MEMCACHED_BINARY and HAVE_LIBMEMCACHED) { + test_true(has_memcached_binary()); const char *argv[1]= { "cycle_memcached" }; test_true(server_startup(*servers, "memcached", 9998, 1, argv)); @@ -257,6 +266,7 @@ static test_return_t memcached_socket_cycle_test(void *object) if (MEMCACHED_BINARY and HAVE_LIBMEMCACHED) { + test_true(has_memcached_binary()); const char *argv[1]= { "cycle_memcached" }; test_true(servers->start_socket_server("memcached", 9997, 1, argv)); @@ -278,6 +288,7 @@ static test_return_t memcached_sasl_test(void *object) if (MEMCACHED_SASL_BINARY and HAVE_LIBMEMCACHED) { + test_true(has_memcached_sasl_binary()); const char *argv[1]= { "cycle_memcached_sasl" }; test_true(server_startup(*servers, "memcached-sasl", 9996, 1, argv));