Valgrind <http://valgrind.org/> is a test that checks for memory management
issues, such as leaks or use of uninitialized variables.
+Some tests are skipped by default in a development environment, based on the
+time they take in comparison to the likelihood that those tests will turn up
+problems during incremental builds. These tests default to being run when when
+building from a tarball or with the configure option --enable-expensive-tests;
+you can also force a one-time toggle of these tests by setting
+VIR_TEST_EXPENSIVE to 0 or 1 at make time, as in:
+
+ make check VIR_TEST_EXPENSIVE=1
+
If you encounter any failing tests, the VIR_TEST_DEBUG environment variable
may provide extra information to debug the failures. Larger values of
VIR_TEST_DEBUG may provide larger amounts of information:
# Run with options not normally exercised by the rpm build, for
# more complete code coverage.
../autogen.sh --prefix="$AUTOBUILD_INSTALL_ROOT" \
+ --enable-expensive-tests \
--enable-test-coverage \
--disable-nls \
--enable-werror \
--build=$(uname -m)-w64-linux \
--host=i686-w64-mingw32 \
--prefix="$AUTOBUILD_INSTALL_ROOT/i686-w64-mingw32/sys-root/mingw" \
+ --enable-expensive-tests \
--enable-werror \
--without-libvirtd \
--without-python
--build=$(uname -m)-w64-linux \
--host=x86_64-w64-mingw32 \
--prefix="$AUTOBUILD_INSTALL_ROOT/x86_64-w64-mingw32/sys-root/mingw" \
+ --enable-expensive-tests \
--enable-werror \
--without-libvirtd \
--without-python
bootstrap_epilogue()
{
# Change paths in gnulib/tests/gnulib.mk from "../../.." to "../..",
+ # and make tests conditional by changing "TESTS" to "GNULIB_TESTS",
# then ensure that gnulib/tests/Makefile.in is up-to-date.
m=gnulib/tests/gnulib.mk
- sed 's,\.\./\.\./\.\.,../..,g' $m > $m-t
+ sed 's,\.\./\.\./\.\.,../..,g; s/^TESTS /GNULIB_TESTS /' $m > $m-t
mv -f $m-t $m
${AUTOMAKE-automake} gnulib/tests/Makefile
}
AC_MSG_RESULT([$withval])
AM_CONDITIONAL([WITH_TESTS], [test "$withval" = "yes"])
+AC_ARG_ENABLE([expensive-tests],
+ [AC_HELP_STRING([--enable-expensive-tests],
+ [set the default for enabling expensive tests (gnulib and long timeouts) ]
+ [@<:@default=check@:>@; use VIR_TEST_EXPENSIVE to override during make])],
+ [case $enableval in
+ 0|no) VIR_TEST_EXPENSIVE_DEFAULT=0 ;;
+ 1|yes) VIR_TEST_EXPENSIVE_DEFAULT=1 ;;
+ check) ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for enable-expensive-tests option])
+ ;;
+ esac], [enableval=check])
+if test "$enableval" = check; then
+ if test -d $srcdir/.git ; then
+ VIR_TEST_EXPENSIVE_DEFAULT=0
+ else
+ VIR_TEST_EXPENSIVE_DEFAULT=1
+ fi
+fi
+AC_SUBST([VIR_TEST_EXPENSIVE_DEFAULT])
+AM_CONDITIONAL([WITH_EXPENSIVE_TESTS], [test $VIR_TEST_EXPENSIVE_DEFAULT = 1])
+
AC_ARG_ENABLE([test-coverage],
AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
[case "${enableval}" in
variables.
</p>
+ <p>
+ Some tests are skipped by default in a development environment,
+ based on the time they take in comparison to the likelihood
+ that those tests will turn up problems during incremental builds.
+ These tests default to being run when when building from a
+ tarball or with the configure option --enable-expensive-tests;
+ you can also force a one-time toggle of these tests by
+ setting VIR_TEST_EXPENSIVE to 0 or 1 at make time, as in:
+ </p>
+<pre>
+ make check VIR_TEST_EXPENSIVE=1
+</pre>
<p>
If you encounter any failing tests, the VIR_TEST_DEBUG
environment variable may provide extra information to debug
-## Makefile for gnulib/lib -*-Makefile-*-
+## Makefile for gnulib/lib
## Copyright (C) 2011, 2013 Red Hat, Inc.
##
include gnulib.mk
INCLUDES = $(GETTEXT_CPPFLAGS)
+
+GNULIB_TESTS0 =
+GNULIB_TESTS1 = $(GNULIB_TESTS)
+if WITH_EXPENSIVE_TESTS
+## Automake requires that at least one conditional call out all tests to
+## be run, for those tests to be shipped in the tarball
+TESTS = $(GNULIB_TESTS)
+endif
+## However, we want to change the set of tests based on the make environment,
+## where the default was set at configure time. Use GNU make constructs to
+## hide our actions from Automake, so we don't get it too confused.
+VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
+$(eval TESTS=$(GNULIB_TESTS$(VIR_TEST_EXPENSIVE)))
--with-qemu-user=%{qemu_user} \
--with-qemu-group=%{qemu_group} \
%{?enable_werror} \
+ --enable-expensive-tests \
%{init_scripts}
make %{?_smp_mflags}
gzip -9 ChangeLog
--without-parallels \
--without-netcf \
--without-audit \
- --without-dtrace
-
+ --without-dtrace \
+ --enable-expensive-tests
%mingw_make %{?_smp_mflags}
path_add = $(subst :,$(PATH_SEPARATOR),\
$(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
+VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
TESTS_ENVIRONMENT = \
abs_top_builddir=$(lv_abs_top_builddir) \
abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \
LIBVIRT_DRIVER_DIR="$(abs_top_builddir)/src/.libs" \
LIBVIRT_AUTOSTART=0 \
LC_ALL=C \
+ VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \
$(VG)