mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
configure: Remove --enable-test-coverage
We provide a custom configure option --enable-test-coverage and 'make cov' target to generate code coverage reports. However gnulib already provides a 'make coverage' which 'just works' and doesn't require a special configure option. This drops our custom implementation in favor of 'make coverage'. Reports are now output to cov/index.html Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
2a00ef6e71
commit
f38d553e2d
20
Makefile.am
20
Makefile.am
@ -16,15 +16,15 @@
|
|||||||
## License along with this library. If not, see
|
## License along with this library. If not, see
|
||||||
## <http://www.gnu.org/licenses/>.
|
## <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
LCOV = lcov
|
|
||||||
GENHTML = genhtml
|
|
||||||
|
|
||||||
SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \
|
SUBDIRS = . gnulib/lib include/libvirt src tools docs gnulib/tests \
|
||||||
tests po examples
|
tests po examples
|
||||||
|
|
||||||
XZ_OPT ?= -v -T0
|
XZ_OPT ?= -v -T0
|
||||||
export XZ_OPT
|
export XZ_OPT
|
||||||
|
|
||||||
|
# have gnulib 'make coverage' output to 'cov' dir
|
||||||
|
COVERAGE_OUT = "cov"
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
@ -77,20 +77,6 @@ check-local: all tests
|
|||||||
check-access:
|
check-access:
|
||||||
@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)
|
@($(MAKE) $(AM_MAKEFLAGS) -C tests check-access)
|
||||||
|
|
||||||
cov: clean-cov
|
|
||||||
$(MKDIR_P) $(top_builddir)/coverage
|
|
||||||
$(LCOV) -c -o $(top_builddir)/coverage/libvirt.info.tmp \
|
|
||||||
-d $(top_builddir)/src \
|
|
||||||
-d $(top_builddir)/tests
|
|
||||||
$(LCOV) -r $(top_builddir)/coverage/libvirt.info.tmp \
|
|
||||||
-o $(top_builddir)/coverage/libvirt.info
|
|
||||||
rm $(top_builddir)/coverage/libvirt.info.tmp
|
|
||||||
$(GENHTML) --show-details -t "libvirt" -o $(top_builddir)/coverage \
|
|
||||||
--legend $(top_builddir)/coverage/libvirt.info
|
|
||||||
|
|
||||||
clean-cov:
|
|
||||||
rm -rf $(top_builddir)/coverage
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = .git-module-status
|
MAINTAINERCLEANFILES = .git-module-status
|
||||||
|
|
||||||
dist-hook: gen-ChangeLog gen-AUTHORS
|
dist-hook: gen-ChangeLog gen-AUTHORS
|
||||||
|
18
configure.ac
18
configure.ac
@ -738,23 +738,6 @@ fi
|
|||||||
AC_SUBST([VIR_TEST_EXPENSIVE_DEFAULT])
|
AC_SUBST([VIR_TEST_EXPENSIVE_DEFAULT])
|
||||||
AM_CONDITIONAL([WITH_EXPENSIVE_TESTS], [test $VIR_TEST_EXPENSIVE_DEFAULT = 1])
|
AM_CONDITIONAL([WITH_EXPENSIVE_TESTS], [test $VIR_TEST_EXPENSIVE_DEFAULT = 1])
|
||||||
|
|
||||||
LIBVIRT_ARG_ENABLE([TEST_COVERAGE], [turn on code coverage instrumentation], [no])
|
|
||||||
case "$enable_test_coverage" in
|
|
||||||
yes|no) ;;
|
|
||||||
*) AC_MSG_ERROR([bad value ${enable_test_coverga} for test-coverage option]) ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test "$enable_test_coverage" = yes; then
|
|
||||||
save_WARN_CFLAGS=$WARN_CFLAGS
|
|
||||||
WARN_CFLAGS=
|
|
||||||
gl_WARN_ADD([-fprofile-arcs])
|
|
||||||
gl_WARN_ADD([-ftest-coverage])
|
|
||||||
COVERAGE_FLAGS=$WARN_CFLAGS
|
|
||||||
AC_SUBST([COVERAGE_CFLAGS], [$COVERAGE_FLAGS])
|
|
||||||
AC_SUBST([COVERAGE_LDFLAGS], [$COVERAGE_FLAGS])
|
|
||||||
WARN_CFLAGS=$save_WARN_CFLAGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
LIBVIRT_ARG_ENABLE([TEST_OOM], [memory allocation failure checking], [no])
|
LIBVIRT_ARG_ENABLE([TEST_OOM], [memory allocation failure checking], [no])
|
||||||
case "$enable_test_oom" in
|
case "$enable_test_oom" in
|
||||||
yes|no) ;;
|
yes|no) ;;
|
||||||
@ -1041,7 +1024,6 @@ LIBVIRT_WIN_RESULT_WINDRES
|
|||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
AC_MSG_NOTICE([Test suite])
|
AC_MSG_NOTICE([Test suite])
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
AC_MSG_NOTICE([ Coverage: $enable_test_coverage])
|
|
||||||
AC_MSG_NOTICE([ Alloc OOM: $enable_test_oom])
|
AC_MSG_NOTICE([ Alloc OOM: $enable_test_oom])
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
AC_MSG_NOTICE([Miscellaneous])
|
AC_MSG_NOTICE([Miscellaneous])
|
||||||
|
@ -29,7 +29,7 @@ EXTRA_DIST = \
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
|
-I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
|
||||||
LDADD = $(STATIC_BINARIES) $(WARN_CFLAGS) $(COVERAGE_LDFLAGS) \
|
LDADD = $(STATIC_BINARIES) $(WARN_CFLAGS) \
|
||||||
$(top_builddir)/src/libvirt.la \
|
$(top_builddir)/src/libvirt.la \
|
||||||
$(top_builddir)/src/libvirt-admin.la
|
$(top_builddir)/src/libvirt-admin.la
|
||||||
|
|
||||||
|
@ -37,9 +37,8 @@ AM_CFLAGS = $(LIBXML_CFLAGS) \
|
|||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(LOCK_CHECKING_CFLAGS) \
|
$(LOCK_CHECKING_CFLAGS) \
|
||||||
$(WIN32_EXTRA_CFLAGS) \
|
$(WIN32_EXTRA_CFLAGS) \
|
||||||
$(COVERAGE_CFLAGS)
|
$(NULL)
|
||||||
AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
|
AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(RELRO_LDFLAGS) \
|
$(RELRO_LDFLAGS) \
|
||||||
$(NO_INDIRECT_LDFLAGS) \
|
$(NO_INDIRECT_LDFLAGS) \
|
||||||
$(CYGWIN_EXTRA_LDFLAGS) \
|
$(CYGWIN_EXTRA_LDFLAGS) \
|
||||||
|
@ -136,7 +136,6 @@ libvirtd_CFLAGS = \
|
|||||||
$(LIBNL_CFLAGS) \
|
$(LIBNL_CFLAGS) \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(PIE_CFLAGS) \
|
$(PIE_CFLAGS) \
|
||||||
$(COVERAGE_CFLAGS) \
|
|
||||||
-I$(srcdir)/access \
|
-I$(srcdir)/access \
|
||||||
-I$(srcdir)/conf \
|
-I$(srcdir)/conf \
|
||||||
-I$(srcdir)/rpc \
|
-I$(srcdir)/rpc \
|
||||||
@ -145,7 +144,6 @@ libvirtd_CFLAGS = \
|
|||||||
libvirtd_LDFLAGS = \
|
libvirtd_LDFLAGS = \
|
||||||
$(RELRO_LDFLAGS) \
|
$(RELRO_LDFLAGS) \
|
||||||
$(PIE_LDFLAGS) \
|
$(PIE_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NO_INDIRECT_LDFLAGS) \
|
$(NO_INDIRECT_LDFLAGS) \
|
||||||
$(NO_UNDEFINED_LDFLAGS) \
|
$(NO_UNDEFINED_LDFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
@ -41,7 +41,6 @@ AM_CFLAGS = \
|
|||||||
$(SELINUX_CFLAGS) \
|
$(SELINUX_CFLAGS) \
|
||||||
$(APPARMOR_CFLAGS) \
|
$(APPARMOR_CFLAGS) \
|
||||||
$(YAJL_CFLAGS) \
|
$(YAJL_CFLAGS) \
|
||||||
$(COVERAGE_CFLAGS) \
|
|
||||||
$(XDR_CFLAGS) \
|
$(XDR_CFLAGS) \
|
||||||
$(WARN_CFLAGS)
|
$(WARN_CFLAGS)
|
||||||
|
|
||||||
@ -266,7 +265,6 @@ endif WITH_SECDRIVER_SELINUX
|
|||||||
|
|
||||||
# This is a fake SSH we use from virnetsockettest
|
# This is a fake SSH we use from virnetsockettest
|
||||||
ssh_SOURCES = ssh.c
|
ssh_SOURCES = ssh.c
|
||||||
ssh_LDADD = $(COVERAGE_LDFLAGS)
|
|
||||||
|
|
||||||
if WITH_LIBXL
|
if WITH_LIBXL
|
||||||
test_programs += xlconfigtest xml2sexprtest sexpr2xmltest \
|
test_programs += xlconfigtest xml2sexprtest sexpr2xmltest \
|
||||||
|
@ -27,7 +27,6 @@ WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
|||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(COVERAGE_CFLAGS) \
|
|
||||||
$(PIE_CFLAGS) \
|
$(PIE_CFLAGS) \
|
||||||
$(LIBXML_CFLAGS) \
|
$(LIBXML_CFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
@ -137,7 +136,6 @@ libvirt_shell_la_CFLAGS = \
|
|||||||
libvirt_shell_la_LDFLAGS = \
|
libvirt_shell_la_LDFLAGS = \
|
||||||
$(AM_LDFLAGS) \
|
$(AM_LDFLAGS) \
|
||||||
$(PIE_LDFLAGS) \
|
$(PIE_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
libvirt_shell_la_LIBADD = \
|
libvirt_shell_la_LIBADD = \
|
||||||
../src/libvirt.la \
|
../src/libvirt.la \
|
||||||
@ -183,7 +181,6 @@ endif ! WITH_BHYVE
|
|||||||
virt_host_validate_LDFLAGS = \
|
virt_host_validate_LDFLAGS = \
|
||||||
$(AM_LDFLAGS) \
|
$(AM_LDFLAGS) \
|
||||||
$(PIE_LDFLAGS) \
|
$(PIE_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
virt_host_validate_LDADD = \
|
virt_host_validate_LDADD = \
|
||||||
@ -206,7 +203,6 @@ virt_login_shell_SOURCES = \
|
|||||||
virt_login_shell_LDFLAGS = \
|
virt_login_shell_LDFLAGS = \
|
||||||
$(AM_LDFLAGS) \
|
$(AM_LDFLAGS) \
|
||||||
$(PIE_LDFLAGS) \
|
$(PIE_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
virt_login_shell_LDADD = \
|
virt_login_shell_LDADD = \
|
||||||
$(STATIC_BINARIES) \
|
$(STATIC_BINARIES) \
|
||||||
@ -239,7 +235,6 @@ virsh_SOURCES = \
|
|||||||
virsh_LDFLAGS = \
|
virsh_LDFLAGS = \
|
||||||
$(AM_LDFLAGS) \
|
$(AM_LDFLAGS) \
|
||||||
$(PIE_LDFLAGS) \
|
$(PIE_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
virsh_LDADD = \
|
virsh_LDADD = \
|
||||||
$(STATIC_BINARIES) \
|
$(STATIC_BINARIES) \
|
||||||
@ -257,7 +252,6 @@ virt_admin_SOURCES = \
|
|||||||
|
|
||||||
virt_admin_LDFLAGS = \
|
virt_admin_LDFLAGS = \
|
||||||
$(AM_LDFLAGS) \
|
$(AM_LDFLAGS) \
|
||||||
$(COVERAGE_LDFLAGS) \
|
|
||||||
$(STATIC_BINARIES) \
|
$(STATIC_BINARIES) \
|
||||||
$(PIE_LDFLAGS) \
|
$(PIE_LDFLAGS) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user