Commit 2f01b097 authored by Matthias Clasen's avatar Matthias Clasen

Some tweaks to coverage support

Rename the configure option to --enable-coverage, and make
it quiet by default.
parent 65a7e563
......@@ -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"
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment