diff options
author | Mikhail Zabaluev <mikhail.zabaluev@nokia.com> | 2009-01-27 19:01:24 +0200 |
---|---|---|
committer | Mikhail Zabaluev <mikhail.zabaluev@nokia.com> | 2009-01-27 19:16:42 +0200 |
commit | cae0b892401c6b88b05aa2e8adf918b181cc8b4c (patch) | |
tree | 5284d7f312f26e1c301252bc61b41549b9c487b0 | |
parent | 259f7a9080a54841be7cfdde4b4b7e30bb3b0b53 (diff) |
Add LCOV machinery
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | tests/twisted/Makefile.am | 15 | ||||
-rw-r--r-- | tools/Makefile.am | 1 | ||||
-rw-r--r-- | tools/lcov.am | 24 |
7 files changed, 51 insertions, 4 deletions
@@ -25,6 +25,10 @@ src/*-enumtypes.[ch] *.lo *.la *.py[co] +*.gcda +*.gcno +/lcov.html +/lcov.info* # Autogenerated build files /aclocal.m4 diff --git a/Makefile.am b/Makefile.am index 971a72b..3f43106 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,3 +30,10 @@ dist-hook: git --work-tree=${top_srcdir} log --stat > ${distdir}/ChangeLog || \ git --work-tree=${top_srcdir} log > ${distdir}/ChangeLog; \ fi + +include tools/lcov.am +LCOV_CHECK_ARGS = CHECK_TWISTED_SLEEP=6 + +clean-local: + -rm -rf lcov.html + -rm -f lcov.info* diff --git a/configure.ac b/configure.ac index 3ffe04f..fcb7df7 100644 --- a/configure.ac +++ b/configure.ac @@ -91,7 +91,7 @@ AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) dnl Check for sofia -PKG_CHECK_MODULES(SOFIA_SIP_UA, sofia-sip-ua-glib >= 1.12.10) +PKG_CHECK_MODULES(SOFIA_SIP_UA, sofia-sip-ua-glib >= 1.12.9) AC_SUBST(SOFIA_SIP_UA_LIBS) AC_SUBST(SOFIA_SIP_UA_CFLAGS) AC_SUBST(SOFIA_SIP_UA_VERSION) diff --git a/src/Makefile.am b/src/Makefile.am index 753bd0d..cb08c61 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -121,3 +121,5 @@ EXTRA_DIST = signals-marshal.list # Correctly clean the generated headers, but keep the xml description CLEANFILES = $(BUILT_SOURCES) $(manager_DATA) +CLEANFILES += *.gcda *.gcno + diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am index ae7ff81..2e8b5b3 100644 --- a/tests/twisted/Makefile.am +++ b/tests/twisted/Makefile.am @@ -10,10 +10,19 @@ TESTS = TESTS_ENVIRONMENT = \ PYTHONPATH=@abs_top_srcdir@/tests/twisted -check-local: check-coding-style +check-local: check-coding-style check-twisted + +CHECK_TWISTED_SLEEP=0 + +check-twisted: $(MAKE) -C tools - sh $(srcdir)/tools/with-session-bus.sh --config-file=tools/tmp-session-bus.conf -- $(MAKE) check-TESTS \ - TESTS="$(TWISTED_TESTS)" TESTS_ENVIRONMENT="PYTHONPATH=@abs_top_srcdir@/tests/twisted $(PYTHON)" + rm -f tools/sofiasip-testing.log + sh $(srcdir)/tools/with-session-bus.sh \ + --config-file=tools/tmp-session-bus.conf \ + --sleep=$(CHECK_TWISTED_SLEEP) \ + -- $(MAKE) check-TESTS \ + TESTS="$(TWISTED_TESTS)" \ + TESTS_ENVIRONMENT="$(TESTS_ENVIRONMENT) $(PYTHON)" EXTRA_DIST = \ $(TWISTED_TESTS) \ 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: |