Exclude headers from lcov reports

The data produced by gcov for static inline functions is too unreliable to be
actually useful. Some lines that are covered are not marked as such, some
other static inline functions are completely ignored, and the reasons why do
not look obvious.
This commit is contained in:
Manuel Pégourié-Gonnard 2014-06-16 16:24:24 +02:00
parent 0dc5e0d80b
commit e41072e7f9
2 changed files with 8 additions and 4 deletions

View file

@ -96,9 +96,11 @@ if(ENABLE_TESTING)
COMMAND rm -rf Coverage
COMMAND lcov --capture --initial --directory library/CMakeFiles/polarssl.dir -o files.info
COMMAND lcov --capture --directory library/CMakeFiles/polarssl.dir -o tests.info
COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
COMMAND lcov --remove all.info -o final.info '*.h'
COMMAND gendesc tests/Descriptions.txt -o 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
COMMAND genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
COMMAND rm -f files.info tests.info all.info final.info descriptions
)
ADD_CUSTOM_TARGET(memcheck

View file

@ -68,9 +68,11 @@ lcov:
rm -rf Coverage
lcov --capture --initial --directory library -o files.info
lcov --capture --directory library -o tests.info
lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
lcov --remove all.info -o final.info '*.h'
gendesc tests/Descriptions.txt -o 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
genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
rm -f files.info tests.info all.info final.info descriptions
apidoc:
mkdir -p apidoc