Force lcov to notice files not covered at all
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af268e7..c1246c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,9 +85,6 @@
COMMAND tests/scripts/test-ref-configs.pl
)
- # add programs/test/selftest even though the selftest functions are
- # called from the testsuites since it runs them in verbose mode,
- # avoiding spurious "uncovered" printf lines
ADD_CUSTOM_TARGET(covtest
COMMAND make test
COMMAND programs/test/selftest
@@ -97,10 +94,11 @@
ADD_CUSTOM_TARGET(lcov
COMMAND rm -rf Coverage
- COMMAND lcov --capture --directory library/CMakeFiles/polarssl.dir -o polarssl.info
+ COMMAND lcov --capture --initial --directory library/CMakeFiles/polarssl.dir -o files.info
+ COMMAND lcov --capture --directory library/CMakeFiles/polarssl.dir -o tests.info
COMMAND gendesc tests/Descriptions.txt -o descriptions
- COMMAND genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage polarssl.info
- COMMAND rm -f polarssl.info descriptions
+ COMMAND genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage files.info tests.info
+ COMMAND rm -f files.info tests.info descriptions
)
ADD_CUSTOM_TARGET(memcheck