]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: add configure option to disable gnulib tests
authorEric Blake <eblake@redhat.com>
Wed, 31 Jul 2013 13:18:58 +0000 (07:18 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 16 Dec 2015 20:11:52 +0000 (13:11 -0700)
commit9265dec1a73d0999e45b8e1ae8e1172c42aecd39
tree1ebc3cffe6f7e249c131d4dd51e983ed933a9af9
parentc4c824ec818ce85de049ed5546fa8ce3c8b76e32
build: add configure option to disable gnulib tests

The gnulib testsuite is relatively stable - the only times it is
likely to have a test change from pass to fail is on a gnulib
submodule update or a major system change (such as moving from
Fedora 18 to 19, or other large change to libc).  While it is an
important test for end users on arbitrary machines (to make sure
that the portability glue works for their machine), it mostly
wastes time for development testing (as most developers aren't
making any of the major changes that would cause gnulib tests
to alter behavior).  Thus, it pays to make the tests optional
at configure time, defaulting to off for development, on for
tarballs, with autobuilders requesting it to be on.  It also
helps to allow a make-time override, via VIR_TEST_EXPENSIVE=[01]
(much the way automake sets up V=[01] for overriding the configure
time default of how verbose to be).

Automake has some pretty hard-coded magic with regards to the
TESTS variable; I had quite a job figuring out how to keep
'make distcheck' passing regardless of the configure option
setting in use, while still disabling the tests at runtime
when I did not configure them on and did not use the override
variable.  Thankfully, we require GNU make, which lets me
hide some information from Automake's magic handling of TESTS.

* bootstrap.conf (bootstrap_epilogue): Munge gnulib test variable.
* configure.ac (--enable-expensive-tests): Add new enable switch.
(VIR_TEST_EXPENSIVE_DEFAULT, WITH_EXPENSIVE_TESTS): Set new
witnesses.
* gnulib/tests/Makefile.am (TESTS): Make tests conditional on
configure settings and the VIR_TEST_EXPENSIVE variable.
* tests/Makefile.am (TESTS_ENVIRONMENT): Expose VIR_TEST_EXPENSIVE
to all tests.
* autobuild.sh: Enable all tests during autobuilds.
* libvirt.spec.in (%configure): Likewise.
* mingw-libvirt.spec.in (%mingw_configure): Likewise.
* docs/hacking.html.in: Document the option.
* HACKING: Regenerate.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 70363ea9ff953d34d240c60723554e63c5a5fb39)

Conflicts:
libvirt.spec.in - no backport of d5cd5bf
HACKING
autobuild.sh
bootstrap.conf
configure.ac
docs/hacking.html.in
gnulib/tests/Makefile.am
libvirt.spec.in
mingw-libvirt.spec.in
tests/Makefile.am