summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index e142c53..ca96469 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,4 +71,33 @@ doxygen: Doxyfile
mkdir -p doxygen
doxygen
+.PHONY: lcov-reset # run lcov from scratch, always
+lcov-reset:
+ make lcov-run
+ make lcov-report
+
+.PHONY: lcov # run lcov from scratch if the dir is not there
+lcov:
+ make lcov-reset
+
+.PHONY: lcov-run # reset run coverage tests
+lcov-run:
+ @-rm -rf lcov
+ find . -name "*.gcda" -exec rm {} \;
+ make check
+
+.PHONY: lcov-report # generate report based on current coverage data
+lcov-report:
+ mkdir lcov
+ lcov --directory . --capture --output-file lcov/lcov.info
+ lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
+ lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
+ rm lcov/remove
+ mv lcov/lcov.cleaned.info lcov/lcov.info
+ genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
+
+#.PHONY: lcov-reset
+#lcov-upload: lcov
+# rsync -rvz -e ssh --delete lcov/* ???
+
ACLOCAL_AMFLAGS = -I m4