X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fserver_container.cc;h=2179fd14f75446b05cc65983259f78c4f65c84f2;hb=585b2385384b32af964b5f2f999e70173b33a460;hp=3a5a7a0e3eaf14eff0cb7da20c21384fb1b827ad;hpb=cc7f3ad60dd92d7e41e0efbf922bb4f6fc9a848f;p=awesomized%2Flibmemcached diff --git a/libtest/server_container.cc b/libtest/server_container.cc index 3a5a7a0e..2179fd14 100644 --- a/libtest/server_container.cc +++ b/libtest/server_container.cc @@ -153,7 +153,12 @@ void server_startup_st::restart() { for (std::vector::iterator iter= servers.begin(); iter != servers.end(); ++iter) { - (*iter)->start(); + Server *server = *iter; + + if (server->check()) { + server->kill(); + } + server->start(); } } @@ -215,9 +220,9 @@ libtest::Server* server_startup_st::create(const std::string& server_type, in_po } else if (server_type.compare("drizzled") == 0) { - if (DRIZZLED_BINARY) + if (has_drizzled()) { - if (HAVE_LIBDRIZZLE) + if (has_libdrizzle()) { server= build_drizzled("localhost", try_port); } @@ -225,8 +230,9 @@ libtest::Server* server_startup_st::create(const std::string& server_type, in_po } else if (server_type.compare("blobslap_worker") == 0) { - if (GEARMAND_BINARY) + if (has_gearmand()) { +#ifdef GEARMAND_BLOBSLAP_WORKER if (GEARMAND_BLOBSLAP_WORKER) { if (HAVE_LIBGEARMAN) @@ -234,11 +240,12 @@ libtest::Server* server_startup_st::create(const std::string& server_type, in_po server= build_blobslap_worker(try_port); } } +#endif // GEARMAND_BLOBSLAP_WORKER } } else if (server_type.compare("memcached") == 0) { - if (HAVE_MEMCACHED_BINARY) + if (has_memcached()) { server= build_memcached("localhost", try_port); } @@ -327,7 +334,7 @@ bool server_startup_st::_start_server(const bool is_socket, else { { -#if defined(DEBUG) +#ifdef DEBUG if (DEBUG) { Outn();