From 53c6e96ce7c20385d3731af95f2a867b5c4de106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 13 Jun 2014 12:22:07 +0200 Subject: [PATCH] Force lcov to notice files not covered at all --- CMakeLists.txt | 10 ++++------ Makefile | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af268e707..c1246c935 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,9 +85,6 @@ if(ENABLE_TESTING) 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 @@ if(ENABLE_TESTING) 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 diff --git a/Makefile b/Makefile index ec09f9cca..1ec10f2d4 100644 --- a/Makefile +++ b/Makefile @@ -60,19 +60,17 @@ test-ref-configs: # CFLAGS='--coverage' make OFLAGS='-g3 -O0' covtest: make check - # 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 programs/test/selftest ( cd tests && ./compat.sh ) ( cd tests && ./ssl-opt.sh ) lcov: rm -rf Coverage - lcov --capture --directory library -o polarssl.info + lcov --capture --initial --directory library -o files.info + lcov --capture --directory library -o tests.info gendesc tests/Descriptions.txt -o descriptions - genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage polarssl.info - rm -f polarssl.info descriptions + genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage files.info tests.info + rm -f files.info tests.info descriptions apidoc: mkdir -p apidoc