From 1a5319a780979cd0bf194d5a77f79d087a3f2202 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 14 Oct 2012 23:02:51 +0200 Subject: [PATCH] Add a coverage target to the Makefile. --- .gitignore | 2 ++ Makefile | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 -- 2.39.2