projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge in exp/alias patches
[awesomized/libmemcached]
/
libtest
/
cmdline.cc
diff --git
a/libtest/cmdline.cc
b/libtest/cmdline.cc
index 6c71f9b0935a13f8b4b78f49f864010dc82c016e..4dc84c9d66990d547f48f40180530c2977b259be 100644
(file)
--- a/
libtest/cmdline.cc
+++ b/
libtest/cmdline.cc
@@
-21,24
+21,24
@@
#include <libtest/common.h>
#include <libtest/common.h>
-#include <libtest/cmdline.h>
-
using namespace libtest;
#include <cstdlib>
#include <string>
#include <sstream>
using namespace libtest;
#include <cstdlib>
#include <string>
#include <sstream>
+namespace libtest {
+
bool exec_cmdline(const std::string& executable, const char *args[])
{
std::stringstream arg_buffer;
bool exec_cmdline(const std::string& executable, const char *args[])
{
std::stringstream arg_buffer;
- arg_buffer <<
"./libtool --mode=execute "
;
+ arg_buffer <<
libtool()
;
- if (getenv("
LIBTEST_TEST_ENVIRONMENT
"))
+ if (getenv("
PWD
"))
{
{
- arg_buffer << getenv("
LIBTEST_TEST_ENVIRONMENT
");
- arg_buffer << "
";
+ arg_buffer << getenv("
PWD
");
+ arg_buffer << "
/
";
}
arg_buffer << executable;
}
arg_buffer << executable;
@@
-47,14
+47,9
@@
bool exec_cmdline(const std::string& executable, const char *args[])
arg_buffer << " " << *ptr;
}
arg_buffer << " " << *ptr;
}
- if (getenv("LIBTEST_TEST_ENVIRONMENT"))
- {
- std::cerr << std::endl << arg_buffer.str() << std::endl;
- }
- else
- {
+#if 0
arg_buffer << " > /dev/null 2>&1";
arg_buffer << " > /dev/null 2>&1";
- }
+#endif
if (system(arg_buffer.str().c_str()) == -1)
{
if (system(arg_buffer.str().c_str()) == -1)
{
@@
-63,3
+58,10
@@
bool exec_cmdline(const std::string& executable, const char *args[])
return true;
}
return true;
}
+
+const char *gearmand_binary()
+{
+ return GEARMAND_BINARY;
+}
+
+} // namespace exec_cmdline