mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01:00
Some tweaks to coverage support
Rename the configure option to --enable-coverage, and make it quiet by default.
This commit is contained in:
parent
65a7e56328
commit
2f01b0975e
@ -2710,15 +2710,15 @@ dnl ************************************
|
|||||||
dnl *** Enable lcov coverage reports ***
|
dnl *** Enable lcov coverage reports ***
|
||||||
dnl ************************************
|
dnl ************************************
|
||||||
|
|
||||||
AC_ARG_ENABLE(gcov,
|
AC_ARG_ENABLE(coverage,
|
||||||
AS_HELP_STRING([--enable-gcov],
|
AS_HELP_STRING([--enable-coverage],
|
||||||
[enable coverage testing with gcov]),
|
[enable coverage testing with gcov]),
|
||||||
[use_gcov=$enableval], [use_gcov=no])
|
[use_gcov=$enableval], [use_gcov=no])
|
||||||
|
|
||||||
AS_IF([ test "x$use_gcov" = "xyes"], [
|
AS_IF([ test "x$use_gcov" = "xyes"], [
|
||||||
dnl we need gcc:
|
dnl we need gcc:
|
||||||
if test "$GCC" != "yes"; then
|
if test "$GCC" != "yes"; then
|
||||||
AC_MSG_ERROR([GCC is required for --enable-gcov])
|
AC_MSG_ERROR([GCC is required for --enable-coverage])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check if ccache is being used
|
dnl Check if ccache is being used
|
||||||
@ -2729,7 +2729,7 @@ AS_IF([ test "x$use_gcov" = "xyes"], [
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
|
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
|
fi
|
||||||
|
|
||||||
ltp_version_list="1.6 1.7 1.8 1.9 1.10"
|
ltp_version_list="1.6 1.7 1.8 1.9 1.10"
|
||||||
|
12
glib.mk
12
glib.mk
@ -52,15 +52,15 @@ lcov:
|
|||||||
# placing the objects files in the .libs/ directory separate from the *.c
|
# placing the objects files in the .libs/ directory separate from the *.c
|
||||||
# we also have to delete tests/.libs/libmoduletestplugin_*.gcda
|
# we also have to delete tests/.libs/libmoduletestplugin_*.gcda
|
||||||
genlcov:
|
genlcov:
|
||||||
rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda
|
$(AM_V_GEN) 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
|
$(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) --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --frames --show-details glib-lcov.info
|
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"
|
@echo "file://$(abs_top_builddir)/glib-lcov/index.html"
|
||||||
|
|
||||||
lcov-clean:
|
lcov-clean:
|
||||||
-$(LTP) --directory $(top_builddir) -z
|
$(AM_V_GEN) $(LTP) --quiet --directory $(top_builddir) -z; \
|
||||||
-rm -rf glib-lcov.info glib-lcov
|
rm -rf glib-lcov.info glib-lcov; \
|
||||||
-find -name '*.gcda' -print | xargs rm
|
find -name '*.gcda' -print | xargs rm
|
||||||
|
|
||||||
# run tests in cwd as part of make check
|
# run tests in cwd as part of make check
|
||||||
check-local: test-nonrecursive
|
check-local: test-nonrecursive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user