projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
libtest: skip extranous new line when printing "starting server" message
[awesomized/libmemcached]
/
libtest
/
server_container.cc
diff --git
a/libtest/server_container.cc
b/libtest/server_container.cc
index 3a5a7a0e3eaf14eff0cb7da20c21384fb1b827ad..25da72c6ff2e410f420a119959f6c26c60e6f18c 100644
(file)
--- a/
libtest/server_container.cc
+++ b/
libtest/server_container.cc
@@
-153,7
+153,12
@@
void server_startup_st::restart()
{
for (std::vector<Server *>::iterator iter= servers.begin(); iter != servers.end(); ++iter)
{
{
for (std::vector<Server *>::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)
{
}
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);
}
{
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)
{
}
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)
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);
}
}
server= build_blobslap_worker(try_port);
}
}
+#endif // GEARMAND_BLOBSLAP_WORKER
}
}
else if (server_type.compare("memcached") == 0)
{
}
}
else if (server_type.compare("memcached") == 0)
{
- if (
HAVE_MEMCACHED_BINARY
)
+ if (
has_memcached()
)
{
server= build_memcached("localhost", try_port);
}
{
server= build_memcached("localhost", try_port);
}
@@
-327,12
+334,11
@@
bool server_startup_st::_start_server(const bool is_socket,
else
{
{
else
{
{
-#if
defined(DEBUG)
+#if
def DEBUG
if (DEBUG)
{
Outn();
Out << "STARTING SERVER(pid:" << server->pid() << "): " << server->running();
if (DEBUG)
{
Outn();
Out << "STARTING SERVER(pid:" << server->pid() << "): " << server->running();
- Outn();
}
#endif
}
}
#endif
}