summaryrefslogtreecommitdiff
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-20 15:36:57 -0400
committerBrad King <brad.king@kitware.com>2015-04-20 15:47:50 -0400
commit356c26ebdfa053f59b2932c78ae81cba3c872dc3 (patch)
tree48586b8e866870dc225395280ee8c1123998db65 /Source/CTest
parentf438cd373131b85dd71b1f902c56fb3584cf8f87 (diff)
downloadcmake-356c26ebdfa053f59b2932c78ae81cba3c872dc3.tar.gz
cmSystemTools: Teach RunSingleCommand to separate stdout and stderr
Extend the RunSingleCommand signature to capture stdout and stderr separately. Allow both to be captured to the same std::string to preserve existing behavior. Update all call sites to do this so that this refactoring does not introduce functional changes.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx12
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
2 files changed, 9 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 7f9825c172..d1e7e3a625 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -709,7 +709,8 @@ int cmCTestScriptHandler::CheckOutSourceDir()
output = "";
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Run cvs: " << this->CVSCheckOut << std::endl);
- res = cmSystemTools::RunSingleCommand(this->CVSCheckOut.c_str(), &output,
+ res = cmSystemTools::RunSingleCommand(
+ this->CVSCheckOut.c_str(), &output, &output,
&retVal, this->CTestRoot.c_str(), this->HandlerVerbose,
0 /*this->TimeOut*/);
if (!res || retVal != 0)
@@ -789,7 +790,8 @@ int cmCTestScriptHandler::PerformExtraUpdates()
retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run Update: "
<< fullCommand << std::endl);
- res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output,
+ res = cmSystemTools::RunSingleCommand(
+ fullCommand.c_str(), &output, &output,
&retVal, cvsArgs[0].c_str(),
this->HandlerVerbose, 0 /*this->TimeOut*/);
if (!res || retVal != 0)
@@ -910,7 +912,8 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run cmake command: "
<< command << std::endl);
- res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
+ res = cmSystemTools::RunSingleCommand(
+ command.c_str(), &output, &output,
&retVal, this->BinaryDir.c_str(),
this->HandlerVerbose, 0 /*this->TimeOut*/);
@@ -956,7 +959,8 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run ctest command: "
<< command << std::endl);
- res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
+ res = cmSystemTools::RunSingleCommand(
+ command.c_str(), &output, &output,
&retVal, this->BinaryDir.c_str(), this->HandlerVerbose,
0 /*this->TimeOut*/);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index d77825374e..95cdf3b51a 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1334,7 +1334,7 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<std::string>& vec)
int retVal = 0;
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " <<
*it << std::endl, this->Quiet);
- if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0,
+ if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, 0, &retVal, 0,
cmSystemTools::OUTPUT_MERGE
/*this->Verbose*/) || retVal != 0 )
{