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.
This commit is contained in:
parent
554d4ed584
commit
95bc8aa6c4
|
@ -247,7 +247,8 @@ void cmCTestMemCheckHandler::GenerateTestCommand(
|
||||||
{
|
{
|
||||||
std::vector<cmStdString>::size_type pp;
|
std::vector<cmStdString>::size_type pp;
|
||||||
std::string memcheckcommand = "";
|
std::string memcheckcommand = "";
|
||||||
memcheckcommand = this->MemoryTester;
|
memcheckcommand
|
||||||
|
= cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str());
|
||||||
for ( pp = 0; pp < this->MemoryTesterOptions.size(); pp ++ )
|
for ( pp = 0; pp < this->MemoryTesterOptions.size(); pp ++ )
|
||||||
{
|
{
|
||||||
args.push_back(this->MemoryTesterOptions[pp]);
|
args.push_back(this->MemoryTesterOptions[pp]);
|
||||||
|
@ -410,29 +411,25 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
||||||
"MemoryCheckCommand").c_str()) )
|
"MemoryCheckCommand").c_str()) )
|
||||||
{
|
{
|
||||||
this->MemoryTester
|
this->MemoryTester
|
||||||
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
|
= this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str();
|
||||||
"MemoryCheckCommand").c_str());
|
|
||||||
}
|
}
|
||||||
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
|
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
|
||||||
"PurifyCommand").c_str()) )
|
"PurifyCommand").c_str()) )
|
||||||
{
|
{
|
||||||
this->MemoryTester
|
this->MemoryTester
|
||||||
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
|
= this->CTest->GetCTestConfiguration("PurifyCommand").c_str();
|
||||||
"PurifyCommand").c_str());
|
|
||||||
}
|
}
|
||||||
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
|
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
|
||||||
"ValgrindCommand").c_str()) )
|
"ValgrindCommand").c_str()) )
|
||||||
{
|
{
|
||||||
this->MemoryTester
|
this->MemoryTester
|
||||||
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
|
= this->CTest->GetCTestConfiguration("ValgrindCommand").c_str();
|
||||||
"ValgrindCommand").c_str());
|
|
||||||
}
|
}
|
||||||
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
|
else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration(
|
||||||
"BoundsCheckerCommand").c_str()) )
|
"BoundsCheckerCommand").c_str()) )
|
||||||
{
|
{
|
||||||
this->MemoryTester
|
this->MemoryTester
|
||||||
= cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration(
|
= this->CTest->GetCTestConfiguration("BoundsCheckerCommand").c_str();
|
||||||
"BoundsCheckerCommand").c_str());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue