diff options
-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 |