Commit 58cc3c22 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

Fix ctest to allow valgrind to show up in the path name of a memcheck tool.

For testing purposes CMake creates dummy memory checkers.  The dummy checkers
are in the CMake build tree. Before this change when the path contained the
string valgrind, such as CMake-valgrind, all the checkers were thought to
be valgrind, and this caused tests to fail.
parent ba363631
......@@ -423,17 +423,18 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
{
this->MemoryTester
= this->CTest->GetCTestConfiguration("MemoryCheckCommand").c_str();
std::string testerName =
cmSystemTools::GetFilenameName(this->MemoryTester);
// determine the checker type
if ( this->MemoryTester.find("valgrind") != std::string::npos )
if ( testerName.find("valgrind") != std::string::npos )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND;
}
else if ( this->MemoryTester.find("purify") != std::string::npos )
else if ( testerName.find("purify") != std::string::npos )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::PURIFY;
}
else if ( this->MemoryTester.find("BC") != std::string::npos )
else if ( testerName.find("BC") != std::string::npos )
{
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment