~alexlauni/libunity-webapps/permissions-tool

« back to all changes in this revision

Viewing changes to Makefile.am.coverage

  • Committer: Alex Launi
  • Date: 2013-01-02 15:56:42 UTC
  • mfrom: (694.1.221 libunity-webapps)
  • Revision ID: alex.launi@canonical.com-20130102155642-uvegtsnqrk2j2nfu
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# Coverage targets
 
3
 
 
4
if HAVE_GCOV
 
5
 
 
6
.PHONY: clean-gcda
 
7
clean-gcda:
 
8
        @echo Removing old coverage results
 
9
        -find -name '*.gcda' -print | xargs -r rm
 
10
 
 
11
.PHONY: coverage-html generate-coverage-html clean-coverage-html
 
12
coverage-html: clean-gcda
 
13
        -$(MAKE) $(AM_MAKEFLAGS) -k check
 
14
        $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
 
15
 
 
16
coverage-xml: clean-gcda
 
17
        -$(MAKE) $(AM_MAKEFLAGS) -k check
 
18
         gcovr --xml -r $(top_builddir) -o "$(top_builddir)/coverage.xml" --exclude='.*tests.*'
 
19
 
 
20
generate-coverage-html:
 
21
        @echo Collecting coverage data
 
22
        $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
 
23
        $(LCOV) --extract coverage.info "`pwd`/src/*" --output-file coverage-src.info
 
24
        LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coverage-html --title "Code Coverage" --legend --show-details coverage-src.info
 
25
 
 
26
clean-coverage-html: clean-gcda
 
27
        -$(LCOV) --directory $(top_builddir) -z
 
28
        -rm -rf coverage.info coverage-src.info coverage-html
 
29
 
 
30
clean-local: clean-coverage-html
 
31
 
 
32
endif # HAVE_GCOV