diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2010-04-23 15:22:54 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2010-04-23 15:22:54 (GMT) |
commit | 6ea92132449275bdd485a6a5a27f399896d16720 (patch) | |
tree | 41a7f09a0642bf18f1ef2562a27f243057610aa1 /Source/CTest | |
parent | 7049dff85a7cbfd64d61de60c27ea794d013570c (diff) | |
download | CMake-6ea92132449275bdd485a6a5a27f399896d16720.zip CMake-6ea92132449275bdd485a6a5a27f399896d16720.tar.gz CMake-6ea92132449275bdd485a6a5a27f399896d16720.tar.bz2 |
Coverage glob should search in Source dir
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 172e1c4..a5b6caf 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -582,8 +582,10 @@ int cmCTestCoverageHandler::ProcessHandler() for(std::set<std::string>::iterator i = uncovered.begin(); i != uncovered.end(); ++i) { + std::string fileName = cmSystemTools::GetFilenameName(*i); std::string shortFileName = this->CTest->GetShortPathToFile(i->c_str()); - covLogFile << "\t<File Name=\"" << cmXMLSafe(i->c_str()) + + covLogFile << "\t<File Name=\"" << cmXMLSafe(fileName) << "\" FullPath=\"" << cmXMLSafe(shortFileName) << "\">\n" << "\t\t<Report>" << std::endl; @@ -2026,7 +2028,7 @@ std::set<std::string> cmCTestCoverageHandler::FindUncoveredFiles( cmsys::Glob gl; gl.RecurseOn(); gl.RecurseThroughSymlinksOff(); - std::string glob = cont->BinaryDir + "/" + *i; + std::string glob = cont->SourceDir + "/" + *i; gl.FindFiles(glob); std::vector<std::string> files = gl.GetFiles(); extraMatches.insert(files.begin(), files.end()); @@ -2037,7 +2039,11 @@ std::set<std::string> cmCTestCoverageHandler::FindUncoveredFiles( for(cmCTestCoverageHandlerContainer::TotalCoverageMap::iterator i = cont->TotalCoverage.begin(); i != cont->TotalCoverage.end(); ++i) { - extraMatches.erase(i->first); + std::string shortPath = this->CTest->GetShortPathToFile( + i->first.c_str()); + shortPath= shortPath.substr(2, shortPath.length() - 1); + std::string fullPath = cont->SourceDir + "/" + shortPath; + extraMatches.erase(fullPath); } } return extraMatches; |