diff options
author | Brad King <brad.king@kitware.com> | 2015-03-12 19:26:24 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-03-12 19:26:24 (GMT) |
commit | addf4db06cb3d4e7482ed54a12a21aaa9110f6a4 (patch) | |
tree | 4b50524c87d2656148c74691f97884e169d4c9c4 | |
parent | 36d4cdad0ed4fbd232142a0247209c68b9c9eee3 (diff) | |
parent | c771f9d945444f6cfe41195e26653f368aff7f42 (diff) | |
download | CMake-addf4db06cb3d4e7482ed54a12a21aaa9110f6a4.zip CMake-addf4db06cb3d4e7482ed54a12a21aaa9110f6a4.tar.gz CMake-addf4db06cb3d4e7482ed54a12a21aaa9110f6a4.tar.bz2 |
Merge topic 'fix_jacoco_coverage_process'
c771f9d9 CTest: Fix Jacoco Coverage
-rw-r--r-- | Source/CTest/cmParseJacocoCoverage.cxx | 5 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/JacocoCoverage/Coverage/target/site/jacoco.xml.in (renamed from Tests/JacocoCoverage/Coverage/target/site/jacoco.xml) | 0 |
3 files changed, 6 insertions, 1 deletions
diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx index ec4cfad..31ad9fe 100644 --- a/Source/CTest/cmParseJacocoCoverage.cxx +++ b/Source/CTest/cmParseJacocoCoverage.cxx @@ -78,7 +78,10 @@ class cmParseJacocoCoverage::XMLParser: public cmXMLParser std::string line; FileLinesType& curFileLines = this->Coverage.TotalCoverage[this->CurFileName]; - curFileLines.push_back(-1); + if(fin) + { + curFileLines.push_back(-1); + } while(cmSystemTools::GetLineFromStream(fin, line)) { curFileLines.push_back(-1); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 08765de..703c548 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2409,6 +2409,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release "${CMake_BINARY_DIR}/Testing/JacocoCoverage/DartConfiguration.tcl") file(COPY "${CMake_SOURCE_DIR}/Tests/JacocoCoverage/Coverage" DESTINATION "${CMake_BINARY_DIR}/Testing/JacocoCoverage") + configure_file("${CMake_BINARY_DIR}/Testing/JacocoCoverage/Coverage/target/site/jacoco.xml.in" + "${CMake_BINARY_DIR}/Testing/JacocoCoverage/Coverage/target/site/jacoco.xml") add_test(NAME CTestJacocoCoverage COMMAND cmake -E chdir ${CMake_BINARY_DIR}/Testing/JacocoCoverage diff --git a/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml b/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml.in index 49c3e87..49c3e87 100644 --- a/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml +++ b/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml.in |