[Libguestfs] how can I run a subset of the tests?

Eric Blake eblake at redhat.com
Mon Feb 21 15:53:20 UTC 2022


On Mon, Feb 21, 2022 at 03:10:02PM +0100, Laszlo Ersek wrote:
> Hi,
> 
> "make check" in libguestfs takes very long (especially when it's run
> after every patch in a series).
> 
> How can I run only those tests that are, for example, in "tests/luks/"?

Disclaimer: The following advice works for libnbd and nbdkit, but I
have not tested it on libguestfs:

For automake-based projects that still use directory recursion, 'make
-C tests/luks check' will run the tests in just one subdirectory, and
'make -C path/to/dir check TESTS=name_of_test' will run just one test.

If we ever switch to non-recursive automake, or even to a different
build system (qemu and libvirt both switched to meson), then I'll have
to relearn tricks.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list