diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-09-30 20:58:56 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-10-01 15:39:09 (GMT) |
commit | 6187876dea89618044e200808bcae75a18bd4043 (patch) | |
tree | 6975bc74a9a9c7fa6f464bcd9812313dc01e55bc /Source/CTest | |
parent | 95bc8aa6c440437ed62c692c302f6a95f57fc361 (diff) | |
download | CMake-6187876dea89618044e200808bcae75a18bd4043.zip CMake-6187876dea89618044e200808bcae75a18bd4043.tar.gz CMake-6187876dea89618044e200808bcae75a18bd4043.tar.bz2 |
CTest: fix pre and post test commands with spaces
If the pre or post memcheck or test commands have spaces in the path these
were never escaped, leading to broken commands. This was not covered in the
test suite so it went unnoticed.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index ead449e..b796b83 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1304,9 +1304,10 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<cmStdString>& vec) for ( it = vec.begin(); it != vec.end(); ++it ) { int retVal = 0; - cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it + std::string cmd = cmSystemTools::ConvertToOutputPath(it->c_str()); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << cmd << std::endl); - if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0, + if ( !cmSystemTools::RunSingleCommand(cmd.c_str(), 0, &retVal, 0, cmSystemTools::OUTPUT_MERGE /*this->Verbose*/) || retVal != 0 ) { |