]> git.sesse.net Git - movit/commitdiff
Add a coverage target to the Makefile.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Oct 2012 21:02:51 +0000 (23:02 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Oct 2012 21:02:51 +0000 (23:02 +0200)
.gitignore
Makefile

index b79e6d38501027ecea7db89e60312cb2a31b7d68..c2bc3d4b82bacb47c37b83b9f8580ee03dc89249 100644 (file)
@@ -22,3 +22,5 @@ white_balance_effect_test
 lift_gamma_gain_effect_test
 flat_input_test
 chain-*.frag
 lift_gamma_gain_effect_test
 flat_input_test
 chain-*.frag
+movit.info
+coverage/
index d068f6cf76c6688fdc2d080ff19a7924be81db71..026fcb8ad9939949195e0fa489addf9233fd38a8 100644 (file)
--- 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
 
 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; \
 
 check: $(TESTS)
        FAIL=0; \
@@ -119,4 +120,10 @@ check: $(TESTS)
        done; \
        exit $$FAIL
 
        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