[gcr/wip/dueno/gitlab-ci: 3/4] build: Add missing make targets for code coverage



commit fed327a47b4cb04e4ecd0f05891683bc205ba9fc
Author: Daiki Ueno <dueno src gnome org>
Date:   Thu Jun 14 17:35:28 2018 +0200

    build: Add missing make targets for code coverage
    
    Copied from gnome-keyring.

 Makefile.am | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/Makefile.am b/Makefile.am
index e62566f..9cdf14d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,6 +69,16 @@ recheck-memory: valgrind-suppressions
        $(MAKE) LOG_FLAGS="-- libtool --mode=execute valgrind $(VALGRIND_ARGS)" \
                $(AM_MAKEFLAGS) recheck
 
+coverage:
+       mkdir -p $(top_builddir)/build/coverage
+       $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
+       $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
+       $(LCOV) --directory . --zerocounters
+       @echo "file://$(abs_top_builddir)/build/coverage/index.html"
+
+clear-coverage:
+       $(LCOV) --directory . --zerocounters
+
 AM_CPPFLAGS = \
        -I$(srcdir) \
        -I$(builddir) \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]