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.
This commit is contained in:
parent
95bc8aa6c4
commit
6187876dea
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue