From: Brian Aker Date: Wed, 27 Jul 2011 10:16:10 +0000 (-0700) Subject: If test env is found we print test, otherwise we shutdown all output. X-Git-Tag: 0.52~48 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=dab2390d336255d64ade35f2f83989496c87450f;p=awesomized%2Flibmemcached If test env is found we print test, otherwise we shutdown all output. --- diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc index 32d0809d..d7bed820 100644 --- a/libtest/cmdline.cc +++ b/libtest/cmdline.cc @@ -60,10 +60,15 @@ bool exec_cmdline(const std::string& executable, const char *args[]) arg_buffer << " " << *ptr; } -#if 0 - arg_buffer << " > /dev/null 2>&1"; -#endif - std::cerr << std::endl << arg_buffer.str() << std::endl; + if (getenv("LIBTEST_TEST_ENVIRONMENT")) + { + std::cerr << std::endl << arg_buffer.str() << std::endl; + } + else + { + arg_buffer << " > /dev/null 2>&1"; + } + if (system(arg_buffer.str().c_str()) == -1) { return false;