[Cmake-commits] CMake branch, master, updated. 6ea92132449275bdd485a6a5a27f399896d16720
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Apr 23 11:22:58 EDT 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 6ea92132449275bdd485a6a5a27f399896d16720 (commit)
from 7049dff85a7cbfd64d61de60c27ea794d013570c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6ea92132449275bdd485a6a5a27f399896d16720
commit 6ea92132449275bdd485a6a5a27f399896d16720
Author: Zach Mullen <zach.mullen at kitware.com>
Date: Fri Apr 23 11:22:54 2010 -0400
Coverage glob should search in Source dir
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;
-----------------------------------------------------------------------
Summary of changes:
CTestCustom.cmake.in | 5 -----
Source/CTest/cmCTestCoverageHandler.cxx | 12 +++++++++---
2 files changed, 9 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list