X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemcapable.cc;h=2bd1aec2ccdf1013d5da3158b7d31ad500e3fe33;hb=c0b779f4045f4858701b3741af805414bc066717;hp=d494a2f8377d424ad9251a0d782c425eca9e572e;hpb=2973993864cf1347163ddfacbbab4f334ff33d35;p=awesomized%2Flibmemcached diff --git a/tests/memcapable.cc b/tests/memcapable.cc index d494a2f8..2bd1aec2 100644 --- a/tests/memcapable.cc +++ b/tests/memcapable.cc @@ -39,22 +39,24 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" 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,7 +107,7 @@ 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()); @@ -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); }