Add Gitter badge
[awesomized/libmemcached] / tests / memcapable.cc
index d494a2f8377d424ad9251a0d782c425eca9e572e..2bd1aec2ccdf1013d5da3158b7d31ad500e3fe33 100644 (file)
   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
-#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);
 }