Have just one debug test, and don't use timers during gdb operations.
[m6w6/libmemcached] / libtest / unittest.cc
index 21081141423a5476595e115fae8d367b42697821..0d50447783ce0c1278d6c07e1b072336ea7e4223 100644 (file)
@@ -42,7 +42,7 @@
 #include <libmemcached-1.0/memcached.h>
 #endif
 
-#if defined(LIBTEST_WITH_LIBGEARMAN_SUPPORT) && LIBTEST_WITH_LIBGEARMAN_SUPPORT
+#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN
 #include <libgearman/gearman.h>
 #endif
 
@@ -290,20 +290,6 @@ static test_return_t gearmand_cycle_test(void *object)
   return TEST_SUCCESS;
 }
 
-#if 0
-static test_return_t memcached_light_cycle_TEST(void *object)
-{
-  server_startup_st *servers= (server_startup_st*)object;
-  test_true(servers);
-
-  test_skip(true, bool(HAVE_MEMCACHED_LIGHT_BINARY));
-
-  test_true(server_startup(*servers, "memcached-light", get_free_port(), 0, NULL, false));
-
-  return TEST_SUCCESS;
-}
-#endif
-
 static test_return_t skip_shim(bool a, bool b)
 {
   test_skip(a, b);
@@ -748,6 +734,7 @@ static test_return_t lookup_false_TEST(void *)
 
 static test_return_t create_tmpfile_TEST(void *)
 {
+  test_skip(0, access("/usr/bin/touch", X_OK ));
   std::string tmp= create_tmpfile(__func__);
   test_compare(-1, access(tmp.c_str(), R_OK));
   test_compare(-1, access(tmp.c_str(), F_OK));
@@ -784,6 +771,16 @@ static test_return_t check_for_gearman(void *)
 {
   test_skip(true, HAVE_LIBGEARMAN);
   test_skip(true, has_gearmand());
+#if defined(HAVE_GEARMAND_BINARY) && HAVE_GEARMAND_BINARY
+  if (GEARMAND_BINARY)
+  {
+    test_zero(access(GEARMAND_BINARY, X_OK ));
+  }
+  else
+  {
+    return TEST_SKIPPED;
+  }
+#endif
 
   testing_service= "gearmand";