Some tweaks to coverage support
authorMatthias Clasen <mclasen@redhat.com>
Sat, 21 Dec 2013 05:04:14 +0000 (00:04 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 21 Dec 2013 18:22:00 +0000 (13:22 -0500)
Rename the configure option to --enable-coverage, and make
it quiet by default.

configure.ac
glib.mk

index 078263d..9fb40d3 100644 (file)
@@ -2710,15 +2710,15 @@ dnl ************************************
 dnl *** Enable lcov coverage reports ***
 dnl ************************************
 
-AC_ARG_ENABLE(gcov,
-  AS_HELP_STRING([--enable-gcov],
+AC_ARG_ENABLE(coverage,
+  AS_HELP_STRING([--enable-coverage],
                 [enable coverage testing with gcov]),
   [use_gcov=$enableval], [use_gcov=no])
 
 AS_IF([ test "x$use_gcov" = "xyes"], [
   dnl we need gcc:
   if test "$GCC" != "yes"; then
-    AC_MSG_ERROR([GCC is required for --enable-gcov])
+    AC_MSG_ERROR([GCC is required for --enable-coverage])
   fi
 
   dnl Check if ccache is being used
@@ -2729,7 +2729,7 @@ AS_IF([ test "x$use_gcov" = "xyes"], [
   esac
 
   if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
-    AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
+    AC_MSG_ERROR([ccache must be disabled when --enable-coverage option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
 
   ltp_version_list="1.6 1.7 1.8 1.9 1.10"
diff --git a/glib.mk b/glib.mk
index f38d929..e906351 100644 (file)
--- a/glib.mk
+++ b/glib.mk
@@ -52,15 +52,15 @@ lcov:
 # placing the objects files in the .libs/ directory separate from the *.c
 # we also have to delete tests/.libs/libmoduletestplugin_*.gcda
 genlcov:
-       rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda
-       $(LTP) --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool
-       LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --frames --show-details glib-lcov.info
+       $(AM_V_GEN) rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda; \
+         $(LTP) --quiet --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool --ignore-errors source; \
+         LANG=C $(LTP_GENHTML) --quiet --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --frames --show-details glib-lcov.info --ignore-errors source
        @echo "file://$(abs_top_builddir)/glib-lcov/index.html"
 
 lcov-clean:
-       -$(LTP) --directory $(top_builddir) -z
-       -rm -rf glib-lcov.info glib-lcov
-       -find -name '*.gcda' -print | xargs rm
+       $(AM_V_GEN) $(LTP) --quiet --directory $(top_builddir) -z; \
+         rm -rf glib-lcov.info glib-lcov; \
+         find -name '*.gcda' -print | xargs rm
 
 # run tests in cwd as part of make check
 check-local: test-nonrecursive