[Cmake-commits] [cmake-commits] king committed cmCTestCoverageHandler.cxx 1.71 1.72
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Mar 11 13:31:46 EDT 2009
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv21072/Source/CTest
Modified Files:
cmCTestCoverageHandler.cxx
Log Message:
BUG: Do not produce empty coverage log files
This moves the filtering of source files to before the production of
coverage log files in order to avoid producing a CoverageLog-*.xml file
for 100 filtered-out files. The change greatly reduces the number of
submitted coverage files when using label filters.
Index: cmCTestCoverageHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestCoverageHandler.cxx,v
retrieving revision 1.71
retrieving revision 1.72
diff -C 2 -d -r1.71 -r1.72
*** cmCTestCoverageHandler.cxx 11 Mar 2009 17:31:32 -0000 1.71
--- cmCTestCoverageHandler.cxx 11 Mar 2009 17:31:40 -0000 1.72
***************
*** 465,480 ****
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
}
! if ( cnt % 100 == 0 )
{
! this->EndCoverageLogFile(covLogFile, logFileCount);
! logFileCount ++;
! if ( !this->StartCoverageLogFile(covLogFile, logFileCount) )
! {
! return -1;
! }
}
! const std::string fullFileName = fileIterator->first;
! const std::string fileName
! = cmSystemTools::GetFilenameName(fullFileName.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Process file: " << fullFileName << std::endl);
--- 465,482 ----
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
}
!
! const std::string fullFileName = fileIterator->first;
! bool shouldIDoCoverage
! = this->ShouldIDoCoverage(fullFileName.c_str(),
! sourceDir.c_str(), binaryDir.c_str());
! if ( !shouldIDoCoverage )
{
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
! ".NoDartCoverage found, so skip coverage check for: "
! << fullFileName.c_str()
! << std::endl);
! continue;
}
!
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Process file: " << fullFileName << std::endl);
***************
*** 487,502 ****
}
! bool shouldIDoCoverage
! = this->ShouldIDoCoverage(fullFileName.c_str(),
! sourceDir.c_str(), binaryDir.c_str());
! if ( !shouldIDoCoverage )
{
! cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
! ".NoDartCoverage found, so skip coverage check for: "
! << fullFileName.c_str()
! << std::endl);
! continue;
}
std::string shortFileName =
this->CTest->GetShortPathToFile(fullFileName.c_str());
--- 489,504 ----
}
! if ( ++cnt % 100 == 0 )
{
! this->EndCoverageLogFile(covLogFile, logFileCount);
! logFileCount ++;
! if ( !this->StartCoverageLogFile(covLogFile, logFileCount) )
! {
! return -1;
! }
}
+ const std::string fileName
+ = cmSystemTools::GetFilenameName(fullFileName.c_str());
std::string shortFileName =
this->CTest->GetShortPathToFile(fullFileName.c_str());
***************
*** 583,587 ****
this->WriteXMLLabels(covSumFile, shortFileName);
covSumFile << "\t</File>" << std::endl;
- cnt ++;
}
this->EndCoverageLogFile(covLogFile, logFileCount);
--- 585,588 ----
More information about the Cmake-commits
mailing list