summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-29 21:51:12 +0100
committerSimon Josefsson <simon@josefsson.org>2008-10-29 21:51:12 +0100
commitd496c335c441eece386ac2a7bb34dceed3e3960e (patch)
tree354e231f54cddb6d2c2896a62c04a7207904ae19 /maint.mk
parentd8c8189d39ebbd04b57fc3485be38147257b46c0 (diff)
downloadgnutls-d496c335c441eece386ac2a7bb34dceed3e3960e.tar.gz
Update gnulib files.
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/maint.mk b/maint.mk
index 24b76503d4..2eea98d5d4 100644
--- a/maint.mk
+++ b/maint.mk
@@ -105,6 +105,30 @@ syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
syntax-check: $(syntax-check-rules)
+# Code Coverage
+
+init-coverage:
+ make clean
+ lcov --directory . --zerocounters
+
+COVERAGE_CCOPTS ?= "-g -fprofile-arcs -ftest-coverage"
+COVERAGE_OUT ?= doc/coverage
+
+build-coverage:
+ make CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS)
+ make CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check
+ mkdir -p $(COVERAGE_OUT)
+ lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
+ --capture
+
+gen-coverage:
+ genhtml --output-directory $(COVERAGE_OUT) \
+ $(COVERAGE_OUT)/$(PACKAGE).info \
+ --highlight --frames --legend \
+ --title "$(PACKAGE_NAME)"
+
+coverage: init-coverage build-coverage gen-coverage
+
# Update gettext files.
PACKAGE ?= $(shell basename $(PWD))
POURL = http://translationproject.org/latest/$(PACKAGE)/