projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
libmemcached: fix #53 with supplied patch
[awesomized/libmemcached]
/
libtest
/
server.h
diff --git
a/libtest/server.h
b/libtest/server.h
index f27ce08f7455066598b6ac333b7eef079cdcc1a9..10c1d3745befe08fd3ff25852d78aeab9718ba78 100644
(file)
--- a/
libtest/server.h
+++ b/
libtest/server.h
@@
-177,7
+177,8
@@
public:
virtual bool ping()= 0;
virtual bool ping()= 0;
- virtual bool build(size_t argc, const char *argv[])= 0;
+ bool init(const char *argv[]);
+ virtual bool build()= 0;
void add_option(const std::string&);
void add_option(const std::string&, const std::string&);
void add_option(const std::string&);
void add_option(const std::string&, const std::string&);
@@
-204,6
+205,8
@@
public:
_log_file.clear();
}
_log_file.clear();
}
+ std::pair<std::string, std::string> output();
+
pid_t pid() const;
bool has_pid() const;
pid_t pid() const;
bool has_pid() const;
@@
-223,6
+226,11
@@
public:
_error= arg;
}
_error= arg;
}
+ void reset_error()
+ {
+ _error.clear();
+ }
+
virtual bool wait_for_pidfile() const;
bool check_pid(pid_t pid_arg) const
virtual bool wait_for_pidfile() const;
bool check_pid(pid_t pid_arg) const
@@
-232,7
+240,7
@@
public:
bool is_socket() const
{
bool is_socket() const
{
- return _
hostname[0] == '/'
;
+ return _
is_socket
;
}
const std::string running() const
}
const std::string running() const
@@
-260,6
+268,11
@@
public:
return out_of_ban_killed_;
}
return out_of_ban_killed_;
}
+ void timeout(uint32_t timeout_)
+ {
+ _timeout= timeout_;
+ }
+
protected:
bool set_pid_file();
Options _options;
protected:
bool set_pid_file();
Options _options;
@@
-276,6
+289,7
@@
private:
bool args(Application&);
std::string _error;
bool args(Application&);
std::string _error;
+ uint32_t _timeout; // This number should be high enough for valgrind startup (which is slow)
};
std::ostream& operator<<(std::ostream& output, const libtest::Server &arg);
};
std::ostream& operator<<(std::ostream& output, const libtest::Server &arg);