projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Additions to testing to better check return values/etc for servers.
[m6w6/libmemcached]
/
libtest
/
gearmand.cc
diff --git
a/libtest/gearmand.cc
b/libtest/gearmand.cc
index bcb7f8aaba2d7bcd7d033d4bf534b14b5ece03d2..caa75f651910ea214184c60134aa9c1ce8f27d52 100644
(file)
--- a/
libtest/gearmand.cc
+++ b/
libtest/gearmand.cc
@@
-164,24
+164,25
@@
public:
return GEARMAND_BINARY;
}
return GEARMAND_BINARY;
}
- const char *pid_file_option()
- {
- return "--pid-file=";
- }
-
const char *daemon_file_option()
{
return "--daemon";
}
const char *daemon_file_option()
{
return "--daemon";
}
-
const char *log_file_option(
)
+
void log_file_option(Application& app, const std::string& arg
)
{
{
- return "--verbose=DEBUG --log-file=";
+ if (arg.empty() == false)
+ {
+ std::string buffer("--log-file=");
+ buffer+= arg;
+ app.add_option("--verbose=DEBUG");
+ app.add_option(buffer);
+ }
}
}
- const char *port_option()
+ bool has_log_file_option() const
{
{
- return
"--port="
;
+ return
true
;
}
bool is_libtool()
}
bool is_libtool()
@@
-194,6
+195,11
@@
public:
return true;
}
return true;
}
+ void has_port_option() const
+ {
+ return true;
+ }
+
bool build(int argc, const char *argv[]);
};
bool build(int argc, const char *argv[]);
};
@@
-203,18
+209,16
@@
bool Gearmand::build(int argc, const char *argv[])
if (getuid() == 0 or geteuid() == 0)
{
if (getuid() == 0 or geteuid() == 0)
{
- a
rg_buffer << " -u root "
;
+ a
dd_option("-u", "root")
;
}
}
- a
rg_buffer << " --listen=localhost "
;
+ a
dd_option("--listen=localhost")
;
for (int x= 1 ; x < argc ; x++)
{
for (int x= 1 ; x < argc ; x++)
{
- a
rg_buffer << " " << argv[x] << " "
;
+ a
dd_option(argv[x])
;
}
}
- set_extra_args(arg_buffer.str());
-
return true;
}
return true;
}