diff options
author | Ted Gould <ted@gould.cx> | 2012-01-13 16:09:40 +0100 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-01-13 16:09:40 +0100 |
commit | e3ce5513c45374858d9af5ae82ff9a711b6cf2aa (patch) | |
tree | befdb9f53cd8fd29e5bb3db9bace971d9998d7ba /Makefile.am | |
parent | 976209fbb36c9b09a59c8d51da80ae065cca8192 (diff) | |
parent | b1aebe568a4f0d0d76e9ea32df47385b26b45c5d (diff) | |
download | libayatana-indicator-e3ce5513c45374858d9af5ae82ff9a711b6cf2aa.tar.gz libayatana-indicator-e3ce5513c45374858d9af5ae82ff9a711b6cf2aa.tar.bz2 libayatana-indicator-e3ce5513c45374858d9af5ae82ff9a711b6cf2aa.zip |
Adding test coverage checking
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 807cad0..182cb2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,3 +44,38 @@ dist-hook: echo Failed to generate AUTHORS: not a branch >&2; \ fi + +# Coverage targets + +.PHONY: clean-gcda +clean-gcda: + @echo Removing old coverage results + -find -name '*.gcda' -print | xargs -r rm + +.PHONY: coverage-html generate-coverage-html clean-coverage-html +coverage-html: clean-gcda + -$(MAKE) $(AM_MAKEFLAGS) -k check + $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html + +generate-coverage-html: + @echo Collecting coverage data + $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool + LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info + +clean-coverage-html: clean-gcda + -$(LCOV) --directory $(top_builddir) -z + -rm -rf coverage.info coveragereport + +.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml +coverage-xml: clean-gcda + -$(MAKE) $(AM_MAKEFLAGS) -k check + $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml + +generate-coverage-xml: + @echo Generating coverage XML report + $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml + +clean-coverage-xml: clean-gcda + -rm -rf $(top_builddir)/coverage.xml + +clean-local: clean-coverage-html clean-coverage-xml |