From 76fc7f014432bedd7c8c103a025b31308136c01b Mon Sep 17 00:00:00 2001 From: Allan LeSage Date: Tue, 27 Mar 2012 16:33:31 -0500 Subject: Removed gcovr dependency, moved coverage targets to own makefile, cleaning up *.gcno. --- Makefile.am | 35 +---------------------------------- Makefile.am.coverage | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 3 +++ m4/gcov.m4 | 22 +++++++++++++--------- 4 files changed, 65 insertions(+), 43 deletions(-) create mode 100644 Makefile.am.coverage diff --git a/Makefile.am b/Makefile.am index 182cb2d..504002a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,37 +45,4 @@ dist-hook: fi -# Coverage targets - -.PHONY: clean-gcda -clean-gcda: - @echo Removing old coverage results - -find -name '*.gcda' -print | xargs -r rm - -.PHONY: coverage-html generate-coverage-html clean-coverage-html -coverage-html: clean-gcda - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html - -generate-coverage-html: - @echo Collecting coverage data - $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool - LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info - -clean-coverage-html: clean-gcda - -$(LCOV) --directory $(top_builddir) -z - -rm -rf coverage.info coveragereport - -.PHONY: coverage-xml generate-coverage-xml clean-coverage-xml -coverage-xml: clean-gcda - -$(MAKE) $(AM_MAKEFLAGS) -k check - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-xml - -generate-coverage-xml: - @echo Generating coverage XML report - $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml - -clean-coverage-xml: clean-gcda - -rm -rf $(top_builddir)/coverage.xml - -clean-local: clean-coverage-html clean-coverage-xml +include $(top_srcdir)/Makefile.am.coverage diff --git a/Makefile.am.coverage b/Makefile.am.coverage new file mode 100644 index 0000000..fb97747 --- /dev/null +++ b/Makefile.am.coverage @@ -0,0 +1,48 @@ + +# Coverage targets + +.PHONY: clean-gcno clean-gcda \ + coverage-html generate-coverage-html clean-coverage-html \ + coverage-gcovr generate-coverage-gcovr clean-coverage-gcovr + +clean-local: clean-gcno clean-coverage-html clean-coverage-gcovr + +if HAVE_GCOV + +clean-gcno: + @echo Removing old coverage instrumentation + -find -name '*.gcno' -print | xargs -r rm + +clean-gcda: + @echo Removing old coverage results + -find -name '*.gcda' -print | xargs -r rm + +coverage-html: clean-gcda + -$(MAKE) $(AM_MAKEFLAGS) -k check + $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html + +generate-coverage-html: + @echo Collecting coverage data + $(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool + LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info + +clean-coverage-html: clean-gcda + -$(LCOV) --directory $(top_builddir) -z + -rm -rf coverage.info coveragereport + +if HAVE_GCOVR + +coverage-gcovr: clean-gcda + -$(MAKE) $(AM_MAKEFLAGS) -k check + $(MAKE) $(AM_MAKEFLAGS) generate-coverage-gcovr + +generate-coverage-gcovr: + @echo Generating coverage GCOVR report + $(GCOVR) -x -r $(top_builddir) -o $(top_builddir)/coverage.xml + +clean-coverage-gcovr: clean-gcda + -rm -rf $(top_builddir)/coverage.xml + +endif # HAVE_GCOVR + +endif # HAVE_GCOV diff --git a/configure.ac b/configure.ac index 5bff63b..435b67c 100644 --- a/configure.ac +++ b/configure.ac @@ -136,6 +136,9 @@ AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes") ########################### m4_include([m4/gcov.m4]) AC_TDD_GCOV +AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes]) +AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes]) +AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes]) AC_SUBST(COVERAGE_CFLAGS) AC_SUBST(COVERAGE_CXXFLAGS) AC_SUBST(COVERAGE_LDFLAGS) diff --git a/m4/gcov.m4 b/m4/gcov.m4 index 9331cd3..3163584 100644 --- a/m4/gcov.m4 +++ b/m4/gcov.m4 @@ -5,11 +5,10 @@ # * gcovr # # Sets ac_cv_check_gcov to yes if tooling is present -# and reports the executables to the variables LCOV, GCOVR and GENHTML. +# and reports the executables to the variables LCOV, GCOVR and GENHTML. AC_DEFUN([AC_TDD_GCOV], -[AC_CACHE_CHECK([whether code coverage tools are available], ac_cv_check_gcov, [ -AC_ARG_ENABLE(gcov, + AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov], [enable coverage testing with gcov]), [use_gcov=$enableval], [use_gcov=no]) @@ -34,7 +33,6 @@ AC_ARG_ENABLE(gcov, lcov_version_list="1.6 1.7 1.8 1.9" AC_CHECK_PROG(LCOV, lcov, lcov) AC_CHECK_PROG(GENHTML, genhtml, genhtml) - AC_CHECK_PROG(GCOVR, gcovr, gcovr) if test "$LCOV"; then AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [ @@ -63,10 +61,8 @@ AC_ARG_ENABLE(gcov, AC_MSG_ERROR([Could not find genhtml from the lcov package]) fi - if test -z "$GCOVR"; then - AC_MSG_ERROR([Could not find gcovr; easy_install (or pip) gcovr]) - fi - + ac_cv_check_gcov=yes + ac_cv_check_lcov=yes # Remove all optimization flags from CFLAGS changequote({,}) @@ -78,5 +74,13 @@ AC_ARG_ENABLE(gcov, COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" COVERAGE_LDFLAGS="-lgcov" + # Check availability of gcovr + AC_CHECK_PROG(GCOVR, gcovr, gcovr) + if test -z "$GCOVR"; then + ac_cv_check_gcovr=no + else + ac_cv_check_gcovr=yes + fi + fi -])]) # AC_TDD_GCOV +]) # AC_TDD_GCOV -- cgit v1.2.3 From c4b29527853bd9e1b90a86cfb86b39bcdfee0f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sun, 1 Apr 2012 20:54:37 +0200 Subject: Indicator Service Manager: we don't have to free values if got with &s from variant See http://is.gd/EyhAhP --- libindicator/indicator-service-manager.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index 33b0557..d0771c1 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -571,9 +571,6 @@ service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_n } } - g_free (new_name); - g_free (prev_name); - return; } -- cgit v1.2.3 From a9c0407ec259017874929c24ec1fa5ad28ac35a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sun, 1 Apr 2012 21:03:19 +0200 Subject: Setting again the variables as const --- libindicator/indicator-service-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c index d0771c1..f58c148 100644 --- a/libindicator/indicator-service-manager.c +++ b/libindicator/indicator-service-manager.c @@ -536,8 +536,8 @@ service_proxy_name_changed (GDBusConnection * connection, const gchar * sender_n { IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data); - gchar * new_name = NULL; - gchar * prev_name = NULL; + const gchar * new_name = NULL; + const gchar * prev_name = NULL; g_variant_get(parameters, "(&s&s&s)", NULL, &prev_name, &new_name); if (new_name == NULL || new_name[0] == 0) { -- cgit v1.2.3 From f7eab1e6edb5d5cc1732256c80115f694f444475 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 2 Apr 2012 18:42:07 -0500 Subject: Fix spelling/grammar errors in an error message. --- libindicator/indicator-desktop-shortcuts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c index 13c1667..0a4e026 100644 --- a/libindicator/indicator-desktop-shortcuts.c +++ b/libindicator/indicator-desktop-shortcuts.c @@ -199,7 +199,7 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec /* But fallback if we can't */ if (priv->actions == ACTIONS_NONE && g_key_file_has_key(keyfile, G_KEY_FILE_DESKTOP_GROUP, OLD_SHORTCUTS_KEY, NULL)) { priv->actions = ACTIONS_XAYATANA; - g_warning("Desktop file '%s' is using a depracted format for it's actions that will be dropped soon.", g_value_get_string(value)); + g_warning("Desktop file '%s' is using a deprecated format for its actions that will be dropped soon.", g_value_get_string(value)); } if (priv->actions == ACTIONS_NONE) { -- cgit v1.2.3 From f75080c55cd666e48f1a7c9c8bcf62e77cfb7f3b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 4 Apr 2012 14:26:17 -0500 Subject: 0.4.95 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bdeac71..4249522 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([libindicator], - [0.4.94], + [0.4.95], [http://bugs.launchpad.net/libindicator], [libindicator], [http://launchpad.net/libindicator]) -- cgit v1.2.3