X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Funittest.cc;h=c21438890c31760d13ae9ed14fc0fa3c4ab6644b;hb=f1b882e65cb7da1344405d25d5c4db150785ee59;hp=59351762645175738a6b366c716e19bfa67c0a1e;hpb=08c302d13c70ea37ecba7a4a1c3862c1c0d3b284;p=awesomized%2Flibmemcached diff --git a/libtest/unittest.cc b/libtest/unittest.cc index 59351762..c2143889 100644 --- a/libtest/unittest.cc +++ b/libtest/unittest.cc @@ -618,9 +618,9 @@ static test_return_t application_doesnotexist_BINARY(void *) true_app.will_fail(); const char *args[]= { "--fubar", 0 }; -#if defined(TARGET_OS_OSX) && TARGET_OS_OSX +#if defined(__APPLE__) && __APPLE__ ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args)); -#elif defined(TARGET_OS_FREEBSD) && TARGET_OS_FREEBSD +#elif defined(__FreeBSD__) && __FreeBSD__ ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args)); #else ASSERT_EQ(Application::SUCCESS, true_app.run(args)); @@ -818,8 +818,8 @@ static test_return_t wait_services_appliction_TEST(void *) static test_return_t gdb_wait_services_appliction_TEST(void *) { test_skip(true, false); -#if defined(TARGET_OS_OSX) && TARGET_OS_OSX - test_skip(0, TARGET_OS_OSX); +#if defined(__APPLE__) && __APPLE__ + test_skip(0, __APPLE__); #endif test_skip(0, access("/etc/services", R_OK )); @@ -842,8 +842,8 @@ static test_return_t gdb_abort_services_appliction_TEST(void *) test_skip(0, access("libtest/abort", X_OK )); test_skip(true, false); -#if defined(TARGET_OS_OSX) && TARGET_OS_OSX - test_skip(0, TARGET_OS_OSX); +#if defined(__APPLE__) && __APPLE__ + test_skip(0, __APPLE__); #endif libtest::Application abort_app("libtest/abort", true); @@ -960,6 +960,12 @@ static test_return_t default_port_TEST(void *) return TEST_SUCCESS; } +static test_return_t check_for_VALGRIND(void *) +{ + test_skip_valgrind(); + return TEST_SUCCESS; +} + static test_return_t check_for_gearman(void *) { test_skip(true, HAVE_LIBGEARMAN); @@ -1206,7 +1212,7 @@ collection_st collection[] ={ {"fatal", disable_fatal_exception, enable_fatal_exception, fatal_message_TESTS }, {"number_of_cpus()", 0, 0, number_of_cpus_TESTS }, {"create_tmpfile()", 0, 0, create_tmpfile_TESTS }, - {"dns", 0, 0, dns_TESTS }, + {"dns", check_for_VALGRIND, 0, dns_TESTS }, {"libtest::Timer", 0, 0, timer_TESTS }, {0, 0, 0, 0} };