From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eli Schwartz <eschwartz93@gmail.com>
Cc: qemu-devel@nongnu.org, "Michael Roth" <michael.roth@amd.com>,
"Kostiantyn Kostiuk" <kkostiuk@redhat.com>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"open list:Rust-related patc..." <qemu-rust@nongnu.org>
Subject: Re: [PATCH] meson: set test programs to not build by default
Date: Wed, 20 Aug 2025 11:23:04 +0100 [thread overview]
Message-ID: <aKWiCBbEKwn5zLRz@redhat.com> (raw)
In-Reply-To: <eda4ade9-ba07-4e6e-adf8-e308a9ec3435@gmail.com>
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 :|
prev parent reply other threads:[~2025-08-20 10:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 15:49 [PATCH] meson: set test programs to not build by default Eli Schwartz
2025-08-19 16:31 ` Daniel P. Berrangé
2025-08-20 5:12 ` Eli Schwartz
2025-08-20 10:23 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKWiCBbEKwn5zLRz@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=eschwartz93@gmail.com \
--cc=farosas@suse.de \
--cc=kkostiuk@redhat.com \
--cc=lvivier@redhat.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).