Some tweaks to coverage support

Rename the configure option to --enable-coverage, and make
it quiet by default.
This commit is contained in:
Matthias Clasen 2013-12-21 00:04:14 -05:00
parent 65a7e56328
commit 2f01b0975e
2 changed files with 10 additions and 10 deletions

View 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"

12
glib.mk
View File

@ -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