From: Steinar H. Gunderson Date: Sun, 14 Oct 2012 21:02:51 +0000 (+0200) Subject: Add a coverage target to the Makefile. X-Git-Tag: 1.0~237 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=1a5319a780979cd0bf194d5a77f79d087a3f2202 Add a coverage target to the Makefile. --- diff --git a/.gitignore b/.gitignore index b79e6d3..c2bc3d4 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ white_balance_effect_test lift_gamma_gain_effect_test flat_input_test chain-*.frag +movit.info +coverage/ diff --git a/Makefile b/Makefile index d068f6c..026fcb8 100644 --- a/Makefile +++ b/Makefile @@ -111,6 +111,7 @@ DEPS=$(OBJS:.o=.d) clean: $(RM) demo $(TESTS) libmovit.a $(OBJS) $(OBJS:.o=.gcno) $(OBJS:.o=.gcda) $(DEPS) step-*.dot + $(RM) -r movit.info coverage/ check: $(TESTS) FAIL=0; \ @@ -119,4 +120,10 @@ check: $(TESTS) done; \ exit $$FAIL -.PHONY: clean check all +# You need to build with COVERAGE=1 to use this target. +coverage: check + lcov -d . -c -o movit.info + lcov --remove movit.info '*_test.cpp' '*/test_util.{cpp,h}' -o movit.info + genhtml -o coverage movit.info + +.PHONY: coverage clean check all