[Telepathy-commits] [telepathy-gabble/master] Add LCOV machinery
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Jan 16 02:47:39 PST 2009
---
.gitignore | 4 ++++
Makefile.am | 1 +
tools/Makefile.am | 1 +
tools/lcov.am | 24 ++++++++++++++++++++++++
4 files changed, 30 insertions(+), 0 deletions(-)
create mode 100644 tools/lcov.am
diff --git a/.gitignore b/.gitignore
index 914c481..dc23715 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
*.[ao]
+*.gcda
+*.gcno
*.l[ao]
*.loT
*.orig
@@ -36,6 +38,8 @@ core
/extensions/extensions.html
/gtk-doc.make
/install-sh
+/lcov.html
+/lcov.info
/libtool
/lib/gibber/gibber-signals-marshal.c
/lib/gibber/gibber-signals-marshal.h
diff --git a/Makefile.am b/Makefile.am
index 7572554..8fb5722 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,4 +9,5 @@ check-twisted: all
check-all: check check-twisted
+include tools/lcov.am
include tools/telepathy.am
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 99cd2a0..f61a9f4 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -10,6 +10,7 @@ EXTRA_DIST = \
glib-interfaces-gen.py \
glib-signals-marshal-gen.py \
identity.xsl \
+ lcov.am \
libglibcodegen.py \
libtpcodegen.py \
telepathy.am \
diff --git a/tools/lcov.am b/tools/lcov.am
new file mode 100644
index 0000000..494eea0
--- /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
+ $(MAKE) lcov-report
+
+## vim:set ft=automake:
--
1.5.6.5
More information about the Telepathy-commits
mailing list