X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemcapable.cc;h=6a9034399bddd2089f7bbddabe1b3b401aafae63;hb=5e760300d15ef4c5b7eed3fb9f37920ebca2f6ec;hp=63a1d269251266cd6d7d41ca1e2a03e706efd9f2;hpb=d9b744aa354952e18e07d6448a4004aa0c7e5802;p=awesomized%2Flibmemcached diff --git a/tests/memcapable.cc b/tests/memcapable.cc index 63a1d269..6a903439 100644 --- a/tests/memcapable.cc +++ b/tests/memcapable.cc @@ -47,14 +47,16 @@ using namespace libtest; #ifndef __INTEL_COMPILER -#pragma GCC diagnostic ignored "-Wstrict-aliasing" +# pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif static std::string executable; static test_return_t quiet_test(void *) { - const char *args[]= { "-q", 0 }; + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "%d", int(get_free_port())); + const char *args[]= { "-p", buffer, "-q", 0 }; test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true)); @@ -105,11 +107,11 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -static void *world_create(server_startup_st& servers, test_return_t& error) +static void *world_create(server_startup_st& servers, test_return_t&) { - SKIP_UNLESS(libtest::has_memcached()) + SKIP_UNLESS(libtest::has_memcached()); - SKIP_UNLESS(server_startup(servers, "memcached", libtest::default_port(), NULL)) + SKIP_UNLESS(server_startup(servers, "memcached", libtest::default_port(), NULL)); return &servers; } @@ -117,7 +119,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error) void get_world(libtest::Framework* world) { - executable= "./clients/memcapable"; + executable= "./src/bin/memcapable"; world->collections(collection); world->create(world_create); }