Add gcov test coverage report

This commit is contained in:
Tim Rühsen 2016-09-23 17:13:32 +02:00
parent 1baaacccd5
commit 9b2d7b7a9c
3 changed files with 17 additions and 0 deletions

6
.gitignore vendored
View File

@ -1,4 +1,7 @@
*.exe *.exe
*.gcda
*.gcno
*.gcov
*.gz *.gz
*.la *.la
*.lo *.lo
@ -10,6 +13,7 @@
*.cache *.cache
*.plist *.plist
*.stamp *.stamp
ABOUT-NLS
aclocal.m4 aclocal.m4
ar-lib ar-lib
autom4te.cache/ autom4te.cache/
@ -43,6 +47,8 @@ gtk-doc.m4
gtk-doc.make gtk-doc.make
include/libpsl.h include/libpsl.h
install-sh install-sh
lcov/
libpsl.info
libpsl.pc libpsl.pc
libtool libtool
ltmain.sh ltmain.sh

View File

@ -19,3 +19,13 @@ dist-hook:
mkdir -p $(distdir)/list/tests mkdir -p $(distdir)/list/tests
cp -p $(PSL_FILE) $(distdir)/list cp -p $(PSL_FILE) $(distdir)/list
cp -p $(PSL_TESTFILE) $(distdir)/list/tests cp -p $(PSL_TESTFILE) $(distdir)/list/tests
clean-local:
rm -rf */*.gc?? libpsl.info lcov
check-coverage:
$(MAKE) clean
lcov --no-external --capture --initial --directory . --output-file libpsl.info
CFLAGS=$CFLAGS" --coverage" LDFLAGS=$LDFLAGS" --coverage" $(MAKE) check
lcov --no-external --capture --directory . --output-file libpsl.info
genhtml --prefix . --ignore-errors source libpsl.info --legend --title "libpsl" --output-directory=lcov

View File

@ -1,5 +1,6 @@
[![Travis-CI Status](https://travis-ci.org/rockdaboot/libpsl.png?branch=master)](https://travis-ci.org/rockdaboot/libpsl) [![Travis-CI Status](https://travis-ci.org/rockdaboot/libpsl.png?branch=master)](https://travis-ci.org/rockdaboot/libpsl)
[![Coverity Scan](https://img.shields.io/coverity/scan/10227.svg)](https://scan.coverity.com/projects/rockdaboot-libpsl) [![Coverity Scan](https://img.shields.io/coverity/scan/10227.svg)](https://scan.coverity.com/projects/rockdaboot-libpsl)
[![Coverage Status](https://coveralls.io/repos/github/rockdaboot/libpsl/badge.svg?branch=master)](https://coveralls.io/github/rockdaboot/libpsl?branch=master)
libpsl - C library to handle the Public Suffix List libpsl - C library to handle the Public Suffix List
=================================================== ===================================================