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, next has been updated via 8cebadd7215fb67b9e2f73e341d8a04520840a04 (commit) via a7b285b07ad87bef6503aa7ededc8af6cb20540e (commit) from f0b50da14d9f14b1a548784eeddfd16eedc0cfea (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cebadd7215fb67b9e2f73e341d8a04520840a04 commit 8cebadd7215fb67b9e2f73e341d8a04520840a04 Merge: f0b50da a7b285b Author: Joe Snyder <joe.sny...@kitware.com> AuthorDate: Thu Nov 19 13:38:55 2015 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Nov 19 13:38:55 2015 -0500 Merge topic 'expand_cobertura_search' into next a7b285b0 CTest: Expand directories for Cobertura search https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7b285b07ad87bef6503aa7ededc8af6cb20540e commit a7b285b07ad87bef6503aa7ededc8af6cb20540e Author: Joseph Snyder <joe.sny...@kitware.com> AuthorDate: Mon Nov 16 16:27:57 2015 -0500 Commit: Joseph Snyder <joe.sny...@kitware.com> CommitDate: Tue Nov 17 15:12:39 2015 -0500 CTest: Expand directories for Cobertura search Change the Cobertura handler to look for an environment variable called "COBERTURADIR" which contains the directory where the coverage.xml file is found. If that variable doesn't exist, continue to use the default of the binary directory. Update the test to use an appropriate value in the environment variables. diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 6027502..2c2cd48 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -820,11 +820,26 @@ int cmCTestCoverageHandler::HandleCoberturaCoverage( { cmParseCoberturaCoverage cov(*cont, this->CTest); - // Assume the coverage.xml is in the source directory - std::string coverageXMLFile = this->CTest->GetBinaryDir() + "/coverage.xml"; + // Assume the coverage.xml is in the binary directory + // check for the COBERTURADIR environment variable, + // if it doesn't exist or is empty, assume the + // binary directory is used. + std::string coverageXMLFile; + const char* covDir = cmSystemTools::GetEnv("COBERTURADIR"); + if(covDir && strlen(covDir) != 0) + { + coverageXMLFile = std::string(covDir); + } + else + { + coverageXMLFile = this->CTest->GetBinaryDir(); + } + // build the find file string with the directory from above + coverageXMLFile += "/coverage.xml"; if(cmSystemTools::FileExists(coverageXMLFile.c_str())) { + // If file exists, parse it cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Parsing Cobertura XML file: " << coverageXMLFile << std::endl, this->Quiet); @@ -833,7 +848,7 @@ int cmCTestCoverageHandler::HandleCoberturaCoverage( else { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - "Cannot find Cobertura XML file: " << coverageXMLFile + " Cannot find Cobertura XML file: " << coverageXMLFile << std::endl, this->Quiet); } return static_cast<int>(cont->TotalCoverage.size()); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f381758..1a811f7 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2544,7 +2544,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set_tests_properties(CTestCoberturaCoverage PROPERTIES PASS_REGULAR_EXPRESSION "Process file.*CoverageTest.java.*Total LOC:.*18.*Percentage Coverage: 72.22.*" - ENVIRONMENT COVFILE=) + ENVIRONMENT COVFILE= + ENVIRONMENT COBERTURADIR=${CMake_BINARY_DIR}/Testing/CoberturaCoverage) # Adding a test case for JaCoCo Coverage ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestCoverageHandler.cxx | 21 ++++++++++++++++++--- Tests/CMakeLists.txt | 3 ++- 2 files changed, 20 insertions(+), 4 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits