diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-04-03 21:33:03 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-04-03 21:33:03 -0500 |
commit | 72c1f1c6b9f169dff5f70be3c7fcaac570254508 (patch) | |
tree | b2fe38f07b9d0acc16636d9e12a82ee93bd41b83 /libdbusmenu-glib | |
parent | 5c3834907b18b2c9230d39767ab9092e80c5c849 (diff) | |
parent | c54e02d80857bd08071e2311f456ef992a9d7a01 (diff) | |
download | libdbusmenu-72c1f1c6b9f169dff5f70be3c7fcaac570254508.tar.gz libdbusmenu-72c1f1c6b9f169dff5f70be3c7fcaac570254508.tar.bz2 libdbusmenu-72c1f1c6b9f169dff5f70be3c7fcaac570254508.zip |
Merge lp:~allanlesage/dbusmenu/TDD to add gcov targets to autotools build for code-coverage reporting. For more information, see this blog post: http://qualityhour.wordpress.com/2012/01/29/test-coverage-tutorial-for-cc-autotools-projects/ .
To compile with coverage tooling, ./autogen.sh --enable-gcov, then make coverage-html . Note that you'll need lcov to autoconf. Also note that you'll get an error on make if you have no tests, as there are no coverage artifacts to generate the html report. For review, please pay special attention to flags added in the project's makefiles.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/Makefile.am | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am index fa7c8cb..b2e796c 100644 --- a/libdbusmenu-glib/Makefile.am +++ b/libdbusmenu-glib/Makefile.am @@ -58,12 +58,14 @@ libdbusmenu_glib_la_SOURCES = \ client.c libdbusmenu_glib_la_LDFLAGS = \ + $(COVERAGE_LDFLAGS) \ -version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \ -no-undefined \ -export-symbols-regex "^[^_].*" libdbusmenu_glib_la_CFLAGS = \ $(DBUSMENUGLIB_CFLAGS) \ + $(COVERAGE_CFLAGS) \ -Wall -Werror -Wno-error=deprecated-declarations \ -DG_LOG_DOMAIN="\"LIBDBUSMENU-GLIB\"" @@ -181,7 +183,12 @@ introspection_sources = \ Dbusmenu-0.4.gir: libdbusmenu-glib.la Dbusmenu_0_4_gir_INCLUDES = \ GObject-2.0 -Dbusmenu_0_4_gir_CFLAGS = $(DBUSMENUGLIB_CFLAGS) -I$(top_srcdir) +Dbusmenu_0_4_gir_CFLAGS = \ + $(DBUSMENUGLIB_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + -I$(top_srcdir) +Dbusmenu_0_4_gir_LDFLAGS = \ + $(COVERAGE_LDFLAGS) Dbusmenu_0_4_gir_LIBS = libdbusmenu-glib.la Dbusmenu_0_4_gir_FILES = $(introspection_sources) Dbusmenu_0_4_gir_NAMESPACE = Dbusmenu |