From 970f7af0372a20cd70fca22bfbdaa22a984f8d55 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 18 Oct 2016 22:54:38 +0200 Subject: [PATCH] try to print coverage report in travis --- .travis.yml | 3 +++ Makefile.am | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a99e8927..fa885f16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,8 @@ addons: - xdotool - fluxbox - gdb + - gcov + - lcov compiler: - gcc @@ -67,6 +69,7 @@ script: # to re-enable if xdotool is allowed. - make test-x - make test-x1 + # - make coverage-cli - gcov source/rofi.c - make distcheck diff --git a/Makefile.am b/Makefile.am index 0b40d647..1777bb21 100644 --- a/Makefile.am +++ b/Makefile.am @@ -351,11 +351,19 @@ $(rofi_SOURCES): $(top_builddir)/gitconfig.h .PHONY: coverage coverage: coverage/index.html +.PHONY: coverage-cli +coverage-cli: coverage.info + lcov -l $^ coverage.info: $(top_builddir)/test/*.gcda $(top_builddir)/source/*.gcda $(top_builddir)/source/**/*.gcda - lcov --capture --directory ./ --output-file coverage.info + lcov --capture --directory $(top_builddir) --output-file coverage.info + lcov -r $@ /usr/include/\* -o $@ coverage/index.html: coverage.info genhtml $^ --output-directory coverage/ +.PHONY: coverage-clean +coverage-clean: + -rm -r coverage.info coverage/ + .PHONY: .FORCE .FORCE: