diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-07-05 23:19:59 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-07-06 00:19:40 -0400 |
commit | 8330ed133c521418af9695b833697f8f48b789ff (patch) | |
tree | 608a2fa0997b9a62f5272a76853b01b5fd68c146 /Makefile.am | |
parent | bb4f8d75af0a08b1e5262986a75042874da29850 (diff) | |
download | dconf-8330ed133c521418af9695b833697f8f48b789ff.tar.gz |
Add support for measuring testcase coverage
You need to ./configure with --enable-gcov and then type 'make lcov'.
HTML report goes into ./lcov-html/index.html
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index a30c0de..6f243f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,3 +9,24 @@ SUBDIRS += editor endif DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc + +.PHONY: lcov lcov-clean +# use recursive makes in order to ignore errors during check +lcov: + -$(MAKE) $(AM_MAKEFLAGS) lcov-clean + -$(MAKE) $(AM_MAKEFLAGS) -k check + lcov --directory $(top_builddir) --capture --output-file dconf-lcov.info --test-name dconf --no-checksum --compat-libtool + LANG=C genhtml --prefix $(top_builddir) --output-directory lcov-html --legend --show-details dconf-lcov.info + @echo + @echo " file://$(abs_top_builddir)/lcov-html/index.html" + @echo + +clean-am: lcov-clean gcno-clean + +gcno-clean: + -find -name '*.gcno' -exec rm -f '{}' ';' + +lcov-clean: + -lcov --directory $(top_builddir) -z + -find -name '*.gcda' -exec rm -f '{}' ';' + rm -rf lcov-html dconf-lcov.info |