summaryrefslogtreecommitdiffstats
path: root/Tests/CTestCoverageCollectGCOV
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2016-03-30 14:31:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-07 12:53:30 (GMT)
commit425d76468564b6b4d2593c8775f5ce6d763f052d (patch)
treee85c0879c43cea14479a9fa0024b46a9f8dd1533 /Tests/CTestCoverageCollectGCOV
parent00e4d1220bb9f3c43bd3d339b0114d2074480bd7 (diff)
downloadCMake-425d76468564b6b4d2593c8775f5ce6d763f052d.zip
CMake-425d76468564b6b4d2593c8775f5ce6d763f052d.tar.gz
CMake-425d76468564b6b4d2593c8775f5ce6d763f052d.tar.bz2
CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOB
Teach CTestCoverageCollectGCOV to honor the CTEST_EXTRA_COVERAGE_GLOB variable. When this variable is set, this module will glob for matching source files that were not covered and include them in the resulting tar file.
Diffstat (limited to 'Tests/CTestCoverageCollectGCOV')
-rw-r--r--Tests/CTestCoverageCollectGCOV/TestProject/extra/uncovered1.cpp0
-rw-r--r--Tests/CTestCoverageCollectGCOV/TestProject/uncovered2.cpp0
-rw-r--r--Tests/CTestCoverageCollectGCOV/test.cmake.in4
3 files changed, 4 insertions, 0 deletions
diff --git a/Tests/CTestCoverageCollectGCOV/TestProject/extra/uncovered1.cpp b/Tests/CTestCoverageCollectGCOV/TestProject/extra/uncovered1.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CTestCoverageCollectGCOV/TestProject/extra/uncovered1.cpp
diff --git a/Tests/CTestCoverageCollectGCOV/TestProject/uncovered2.cpp b/Tests/CTestCoverageCollectGCOV/TestProject/uncovered2.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/CTestCoverageCollectGCOV/TestProject/uncovered2.cpp
diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in b/Tests/CTestCoverageCollectGCOV/test.cmake.in
index b2e6d6d..d48ef61 100644
--- a/Tests/CTestCoverageCollectGCOV/test.cmake.in
+++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in
@@ -15,7 +15,9 @@ list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
"/foo/something"
"/3rdparty/"
"/bar/somethingelse"
+ "/CMakeFiles/"
)
+list(APPEND CTEST_EXTRA_COVERAGE_GLOB "*.cpp")
include(CTestCoverageCollectGCOV)
set(tar_file ${CTEST_BINARY_DIRECTORY}/gcov.tar)
@@ -41,6 +43,8 @@ set(expected_out
Testing/CoverageInfo/data.json
Testing/CoverageInfo/extra.cpp.gcov
Testing/CoverageInfo/main.cpp.gcov
+ uncovered/extra/uncovered1.cpp
+ uncovered/uncovered2.cpp
)
if("${out}" STREQUAL "${expected_out}")