mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-12 04:20:01 -05:00
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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user