summaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2013-03-23 08:17:24 +0100
committerReinhard Tartler <siretart@tauware.de>2013-04-05 18:55:11 +0200
commita862c7d3368241e72a465ab944afa38ea62a6640 (patch)
tree8e1ef0f68082a2f27b56858e57e7bc4a9c3ce91b /tests/Makefile
parent52cd84d4d4e335daf26eb8c8b60c2578b3341b91 (diff)
Integrate lcov/gcov into Libav
The gcov/lcov are a common toolchain for visualizing code coverage with the GNU/Toolchain. The documentation and implementation of this integration was heavily inspired from the blog entry by Mike Melanson: http://multimedia.cx/eggs/using-lcov-with-ffmpeg/
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 67ce45e862..d60ee5a26e 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -123,6 +123,19 @@ $(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
fate-list:
@printf '%s\n' $(sort $(FATE))
+coverage.info: TAG = LCOV
+coverage.info:
+ $(M)lcov -d $(CURDIR) -b $(SRC_PATH) --capture -o $@
+
+lcov: TAG = GENHTML
+lcov: coverage.info
+ $(M)genhtml -o $(CURDIR)/lcov $<
+
+lcov-reset: TAG = LCOV
+lcov-reset:
+ $(M)lcov -d $(CURDIR) --zerocounters
+ $(Q)$(RM) -f coverage.info
+
clean:: testclean
testclean:
@@ -132,4 +145,5 @@ testclean:
-include $(wildcard tests/*.d)
-.PHONY: fate*
+.PHONY: fate* lcov lcov-reset
+.INTERMEDIATE: coverage.info