[cmake-commits] david.cole committed cmCTestCoverageHandler.cxx 1.43
1.44
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jun 11 15:36:52 EDT 2007
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv24628/Source/CTest
Modified Files:
cmCTestCoverageHandler.cxx
Log Message:
BUG: Never return a string containing a ":" from cmCTest::GetShortPathToFile - replace them with "_". DART cannot construct valid file names during dashboard rollup with ":" in the short path. Also, fix the Bullseye coverage handler so that the file names and paths match in both the coverage summary and the individual coverage logs.
Index: cmCTestCoverageHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestCoverageHandler.cxx,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- cmCTestCoverageHandler.cxx 8 Jun 2007 16:29:40 -0000 1.43
+++ cmCTestCoverageHandler.cxx 11 Jun 2007 19:36:50 -0000 1.44
@@ -1288,7 +1288,7 @@
<< std::endl);
// start the file output
covLogFile << "\t<File Name=\""
- << this->CTest->MakeXMLSafe(file.c_str())
+ << this->CTest->MakeXMLSafe(i->first.c_str())
<< "\" FullPath=\"" << this->CTest->MakeXMLSafe(
this->CTest->GetShortPathToFile(
i->second.c_str())) << "\">" << std::endl
@@ -1478,21 +1478,22 @@
<< std::endl);
continue;
}
+
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Doing coverage for: "
<< file.c_str()
<< std::endl);
coveredFiles.push_back(sourceFile);
+ coveredFilesFullPath.push_back(file);
+
number_files++;
total_functions += totalFunctions;
total_tested += functionsCalled;
total_untested += (totalFunctions - functionsCalled);
+
std::string fileName = cmSystemTools::GetFilenameName(file.c_str());
- // get file relative to the source dir
- file = cmSystemTools::RelativePath(cont->SourceDir.c_str(),
- file.c_str());
- coveredFilesFullPath.push_back(file);
+
float cper = percentBranch + percentFunction;
if(totalBranches > 0)
{
@@ -1519,7 +1520,7 @@
tmpLog << "percentBranch: " << percentBranch << "\n";
tmpLog << "percentCoverage: " << percent_coverage << "\n";
tmpLog << "coverage metric: " << cmet << "\n";
- covSumFile << "\t<File Name=\"" << this->CTest->MakeXMLSafe(fileName)
+ covSumFile << "\t<File Name=\"" << this->CTest->MakeXMLSafe(sourceFile)
<< "\" FullPath=\"" << this->CTest->MakeXMLSafe(
this->CTest->GetShortPathToFile(file.c_str()))
<< "\" Covered=\"" << (cmet>0?"true":"false") << "\">\n"
More information about the Cmake-commits
mailing list