summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2010-04-23 15:22:54 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2010-04-23 15:22:54 (GMT)
commit6ea92132449275bdd485a6a5a27f399896d16720 (patch)
tree41a7f09a0642bf18f1ef2562a27f243057610aa1
parent7049dff85a7cbfd64d61de60c27ea794d013570c (diff)
downloadCMake-6ea92132449275bdd485a6a5a27f399896d16720.zip
CMake-6ea92132449275bdd485a6a5a27f399896d16720.tar.gz
CMake-6ea92132449275bdd485a6a5a27f399896d16720.tar.bz2
Coverage glob should search in Source dir
-rw-r--r--CTestCustom.cmake.in5
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx12
2 files changed, 9 insertions, 8 deletions
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index b0486b4..abe1b42 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -66,8 +66,3 @@ SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude Qt source files from coverage results:
"[A-Za-z]./[Qq]t/qt-.+-opensource-src"
)
-
-SET(CTEST_EXTRA_COVERAGE_GLOB
- *.txx
- *.cxx
-)
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;