Re: [PATCH 2/2] build: add configure option to disable gnulib tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/01/13 00:48, Eric Blake wrote:
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, and where autobuilders can force the tests on.  It also
helps to make the configure choice have a runtime-override, by
using 'make check VIR_TEST_EXPENSIVE=1'.

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.

build: add configure option to disable gnulib tests
* configure.ac (--enable-gnulib-tests): Add new enable switch.
(WITH_GNULIB_TESTS): Set new witness.
* gnulib/tests/Makefile.am (TESTS): Make tests conditional on
oth configure settings and the VIR_TEST_EXPENSIVE variable.
* autobuild.sh: Enable 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@xxxxxxxxxx>
---
  HACKING                  |  9 +++++++++
  autobuild.sh             |  3 +++
  bootstrap.conf           |  3 ++-
  configure.ac             | 18 ++++++++++++++++++
  docs/hacking.html.in     | 13 +++++++++++++
  gnulib/tests/Makefile.am | 13 ++++++++++++-
  libvirt.spec.in          |  1 +
  mingw-libvirt.spec.in    |  4 ++--
  8 files changed, 60 insertions(+), 4 deletions(-)


...

diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 8120b19..3fda9f0 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in

...

@@ -136,6 +148,7 @@
  <pre>
    ./qemuxml2xmltest
  </pre>
+

Stray newline addition? Or is the XSL transformation playing weird again?

          <p>There is also a <code>./run</code> script at the top level,
            to make it easier to run programs that have not yet been
            installed, as well as to wrap invocations of various tests

When I configure libvirt with --enable-gnulib-tests then the VIR_TEST_EXPENSIVE doesn't get set and the expensive tests are not being run.

Otherwise I really like this addition. I'll be sending some tests checking the VIR_TEST_EXPENSIVE env variable today.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]