projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Valgrind returns a different error for invalid binary.
[m6w6/libmemcached]
/
libtest
/
server.cc
diff --git
a/libtest/server.cc
b/libtest/server.cc
index 8ca6b53e60ee812082735ff2361f44f070ed469a..e554039a1c523d8dea88c4c869f89f067af85ed8 100644
(file)
--- a/
libtest/server.cc
+++ b/
libtest/server.cc
@@
-138,6
+138,19
@@
bool Server::start()
}
Application app(executable(), is_libtool());
}
Application app(executable(), is_libtool());
+
+ if (is_debug())
+ {
+ app.use_gdb();
+ }
+ else if (getenv("TESTS_ENVIRONMENT"))
+ {
+ if (strstr(getenv("TESTS_ENVIRONMENT"), "gdb"))
+ {
+ app.use_gdb();
+ }
+ }
+
if (args(app) == false)
{
Error << "Could not build command()";
if (args(app) == false)
{
Error << "Could not build command()";
@@
-293,8
+306,7
@@
bool Server::set_log_file()
int fd;
if ((fd= mkstemp(file_buffer)) == -1)
{
int fd;
if ((fd= mkstemp(file_buffer)) == -1)
{
- perror(file_buffer);
- return false;
+ libtest::fatal(LIBYATL_DEFAULT_PARAM, "mkstemp() failed on %s with %s", file_buffer, strerror(errno));
}
close(fd);
}
close(fd);
@@
-307,13
+319,9
@@
bool Server::args(Application& app)
{
// Set a log file if it was requested (and we can)
{
// Set a log file if it was requested (and we can)
- if (
getenv("LIBTEST_LOG") and
has_log_file_option())
+ if (has_log_file_option())
{
{
- if (not set_log_file())
- {
- return false;
- }
-
+ set_log_file();
log_file_option(app, _log_file);
}
log_file_option(app, _log_file);
}