diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-09-30 18:25:20 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-10-01 15:39:09 (GMT) |
commit | 95bc8aa6c440437ed62c692c302f6a95f57fc361 (patch) | |
tree | 13479928fb3fcf04bfc987c8cd1a15a7c0a1f4e9 /Source/CTest | |
parent | 554d4ed584fbeba0994d36c51457128e9e9ec0dc (diff) | |
download | CMake-95bc8aa6c440437ed62c692c302f6a95f57fc361.zip CMake-95bc8aa6c440437ed62c692c302f6a95f57fc361.tar.gz CMake-95bc8aa6c440437ed62c692c302f6a95f57fc361.tar.bz2 |
CTest: fix usage of memory checker with spaces in path
The filename was escaped in cmCTestMemCheckHandler::InitializeMemoryChecking()
and again before it was written to output in
cmCTestRunTest::ComputeArguments().
Once someone uses e.g. a valgrind path with spaces this leads to double escaping
making the memory checker fail completely because of the invalid path.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index a2a16d3..f446c94 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -247,7 +247,8 @@ void cmCTestMemCheckHandler::GenerateTestCommand( { std::vector<cmStdString>::size_type pp; std::string memcheckcommand = ""; - memcheckcommand = this->MemoryTester; + memcheckcommand + = cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str()); for ( pp = 0; pp < this->MemoryTesterOptions.size(); pp ++ ) { args.push_back(this->MemoryTesterOptions[pp]); @@ -410,29 +411,25 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() "MemoryCheckCommand").c_str()) ) { this->MemoryTester - = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( - "MemoryCheckCommand").c_str()); + = this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str(); } else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( "PurifyCommand").c_str()) ) { this->MemoryTester - = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( - "PurifyCommand").c_str()); + = this->CTest->GetCTestConfiguration("PurifyCommand").c_str(); } else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( "ValgrindCommand").c_str()) ) { this->MemoryTester - = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( - "ValgrindCommand").c_str()); + = this->CTest->GetCTestConfiguration("ValgrindCommand").c_str(); } else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( "BoundsCheckerCommand").c_str()) ) { this->MemoryTester - = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( - "BoundsCheckerCommand").c_str()); + = this->CTest->GetCTestConfiguration("BoundsCheckerCommand").c_str(); } else { |