summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMikhail Zabaluev <mikhail.zabaluev@nokia.com>2009-01-27 19:01:24 +0200
committerMikhail Zabaluev <mikhail.zabaluev@nokia.com>2009-01-27 19:16:42 +0200
commitcae0b892401c6b88b05aa2e8adf918b181cc8b4c (patch)
tree5284d7f312f26e1c301252bc61b41549b9c487b0 /tools
parent259f7a9080a54841be7cfdde4b4b7e30bb3b0b53 (diff)
Add LCOV machinery
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/lcov.am24
2 files changed, 25 insertions, 0 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 4bf514f..b5b2331 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -16,6 +16,7 @@ EXTRA_DIST = \
glib-gtypes-generator.py \
glib-signals-marshal-gen.py \
identity.xsl \
+ lcov.am \
libglibcodegen.py
CLEANFILES = libglibcodegen.pyc libglibcodegen.pyo $(noinst_SCRIPTS)
diff --git a/tools/lcov.am b/tools/lcov.am
new file mode 100644
index 0000000..7384f1b
--- /dev/null
+++ b/tools/lcov.am
@@ -0,0 +1,24 @@
+lcov-reset:
+ lcov --directory @top_srcdir@ --zerocounters
+
+lcov-report:
+ lcov --directory @top_srcdir@ --capture \
+ --output-file @top_builddir@/lcov.info.tmp
+ lcov --directory @top_srcdir@ --output-file @top_builddir@/lcov.info \
+ --remove @top_builddir@/lcov.info.tmp telepathy-glib-scan.c
+ rm @top_builddir@/lcov.info.tmp
+ $(mkdir_p) @top_builddir@/lcov.html
+ git_commit=`GIT_DIR=@top_srcdir@/.git git log -1 --pretty=format:%h 2>/dev/null`;\
+ genhtml --title "@PACKAGE_STRING@ $$git_commit" \
+ --output-directory @top_builddir@/lcov.html lcov.info
+ @echo
+ @echo 'lcov report can be found in:'
+ @echo 'file://@abs_top_builddir@/lcov.html/index.html'
+ @echo
+
+lcov-check:
+ $(MAKE) lcov-reset
+ $(MAKE) check $(LCOV_CHECK_ARGS)
+ $(MAKE) lcov-report
+
+## vim:set ft=automake: