projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
flush
[awesomized/libmemcached]
/
tests
/
memcapable.cc
diff --git
a/tests/memcapable.cc
b/tests/memcapable.cc
index 63a1d269251266cd6d7d41ca1e2a03e706efd9f2..2bd1aec2ccdf1013d5da3158b7d31ad500e3fe33 100644
(file)
--- a/
tests/memcapable.cc
+++ b/
tests/memcapable.cc
@@
-39,22
+39,24
@@
Test that we are cycling the servers we are creating during testing.
*/
Test that we are cycling the servers we are creating during testing.
*/
-#include
<mem_config.h>
+#include
"mem_config.h"
-#include
<libtest/test.hpp>
-#include
<libmemcached-1.0/memcached.h>
+#include
"libtest/test.hpp"
+#include
"libmemcached-1.0/memcached.h"
using namespace libtest;
#ifndef __INTEL_COMPILER
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 *)
{
#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));
test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
@@
-105,11
+107,11
@@
collection_st collection[] ={
{0, 0, 0, 0}
};
{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;
}
return &servers;
}
@@
-117,7
+119,7
@@
static void *world_create(server_startup_st& servers, test_return_t& error)
void get_world(libtest::Framework* world)
{
void get_world(libtest::Framework* world)
{
- executable= "./
clients
/memcapable";
+ executable= "./
src/bin
/memcapable";
world->collections(collection);
world->create(world_create);
}
world->collections(collection);
world->create(world_create);
}