diff options
author | Joseph Snyder <joe.snyder@kitware.com> | 2014-05-21 19:19:35 (GMT) |
---|---|---|
committer | Joseph Snyder <joe.snyder@kitware.com> | 2014-06-12 14:38:19 (GMT) |
commit | 558c2190e89c4a62d9e279cfee2af1f77f628b9b (patch) | |
tree | f5452711f616f0a78493248978f294ad6b110db6 /Tests/CMakeLists.txt | |
parent | 47cde18849201c3b58479d38725b554f3ad34eaf (diff) | |
download | CMake-558c2190e89c4a62d9e279cfee2af1f77f628b9b.zip CMake-558c2190e89c4a62d9e279cfee2af1f77f628b9b.tar.gz CMake-558c2190e89c4a62d9e279cfee2af1f77f628b9b.tar.bz2 |
CTest: Add Jacoco Coverage functionality
Add the ability to parse the XML output of the Jacoco tool.
Jacoco (www.eclemma.org/jacoco) is a Java coverage tool.
Add and integrate a class for the parser and
include a test which utilizes the new parser.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 05442a1..852f78f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2202,6 +2202,22 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release "Process file.*CoverageTest.java.*Total LOC:.*18.*Percentage Coverage: 72.22.*" ENVIRONMENT COVFILE=) + + # Adding a test case for JaCoCo Coverage + configure_file( + "${CMake_SOURCE_DIR}/Tests/JacocoCoverage/DartConfiguration.tcl.in" + "${CMake_BINARY_DIR}/Testing/JacocoCoverage/DartConfiguration.tcl") + file(COPY "${CMake_SOURCE_DIR}/Tests/JacocoCoverage/Coverage" + DESTINATION "${CMake_BINARY_DIR}/Testing/JacocoCoverage") + add_test(NAME CTestJacocoCoverage + COMMAND cmake -E chdir + ${CMake_BINARY_DIR}/Testing/JacocoCoverage + $<TARGET_FILE:ctest> -T Coverage --debug) + set_tests_properties(CTestJacocoCoverage PROPERTIES + PASS_REGULAR_EXPRESSION + "Process file.*CoverageTest.java.*Total LOC:.*17.*Percentage Coverage: 76.47*" + ENVIRONMENT COVFILE=) + function(add_config_tests cfg) set(base "${CMake_BINARY_DIR}/Tests/CTestConfig") |