coverage: Added coverage makefile target

Added coverage files to `clean` and `coverage` target to generate HTML
report of coverage.
This commit is contained in:
Christian Decker
2017-01-09 11:18:11 +01:00
committed by Rusty Russell
parent bd6b9c377e
commit 07fbeee29d
2 changed files with 10 additions and 0 deletions

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ libsecp256k1.la
gen_* gen_*
daemon/lightning-cli daemon/lightning-cli
check-bolt check-bolt
coverage

View File

@@ -271,6 +271,13 @@ check-source: check-makefile check-source-bolt check-whitespace \
full-check: check $(TEST_PROGRAMS) check-source full-check: check $(TEST_PROGRAMS) check-source
coverage/coverage.info: check $(TEST_PROGRAMS)
mkdir coverage || true
lcov --capture --directory . --output-file coverage/coverage.info
coverage: coverage/coverage.info
genhtml coverage/coverage.info --output-directory coverage
# Ignore test/ directories. # Ignore test/ directories.
TAGS: FORCE TAGS: FORCE
$(RM) TAGS; find * -name test -type d -prune -o -name '*.[ch]' -print | xargs etags --append $(RM) TAGS; find * -name test -type d -prune -o -name '*.[ch]' -print | xargs etags --append
@@ -360,6 +367,8 @@ clean: daemon-clean wire-clean
$(RM) ccan/config.h gen_*.h $(RM) ccan/config.h gen_*.h
$(RM) ccan/ccan/cdump/tools/cdump-enumstr.o $(RM) ccan/ccan/cdump/tools/cdump-enumstr.o
$(RM) doc/deployable-lightning.{aux,bbl,blg,dvi,log,out,tex} $(RM) doc/deployable-lightning.{aux,bbl,blg,dvi,log,out,tex}
find . -name '*gcda' -delete
find . -name '*gcno' -delete
include daemon/Makefile include daemon/Makefile