On Wed, Aug 20, 2025 at 01:12:35AM -0400, Eli Schwartz wrote:
> But your proposal runs counter to existing code already in qemu's build
> system, i.e. the comment I've updated. So I don't think it's entirely
> fair to raise an objection to my patch at all -- better you should raise
> a meta-discussion about this to discuss changing the existing
> build_by_defaults.

The comment in tests/functional/meson.build is a special case rule
that isn't building anything. Rather that precache logic is using a
custom target to download several GB of disk images needed by tests,
such that the tests themselves won't hit a timeout downloading images
on first run. That use of  "build_by_default: false" would be fine.

> > If we want the ability to opt-out of building tests by default
> > so reduce build time, IMHO that should be behind a 'configure'
> > flag / meson_options.txt setting.
> 
> 
> There is anyways no point in this being a meson_options.txt setting and
> complexifying all test programs via conditionals. As explained in my
> link, you can have Makefile itself read a configure option and run:

AFAICT, it shouldn't be more complex than anything else we're doing
with meson option handling. eg instead of hardcoding 'false', do
something like:

  build_by_default: get_option('tests')

where the option defaults to 'true'.

> Either way it is definitely of interest to users running a build +
> install of a tagged release, to skip building tests they won't run. e.g.
> many linux distros make the test phase of packaging be optional.

FWIW, I would really strongly suggest to *always* run QEMU's tests
from release tarball, and most especially for distro packaging.
There are just way too many moving parts in our 3rd party deps to
be confident everything in QEMU works correctly without having run
the tests.

> Automake works the same way -- tests can be excluded from `make && make
> install`, but get built on demand by `make check`.

When we still used automake in libvirt, we overrode that behaviuor to
always build tests, as it was causing too frequent problems with
contributors overlooking that a patch had broken test compile.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to