On 8/19/25 12:31 PM, Daniel P. Berrangé wrote: > On Tue, Aug 19, 2025 at 11:49:40AM -0400, Eli Schwartz wrote: >> Rather, they are built when running `meson test`. This change is inert >> unless building with meson 1.7, as previous versions of meson build all >> `meson test` dependencies as part of `ninja all` as well. >> >> See: >> https://mesonbuild.com/Release-notes-for-1-7-0.html#test-targets-no-longer-built-by-default >> >> An existing comment references this meson issue, with an included bug >> reference, but was written before meson 1.7 fixed the bug. Update the >> comment to change the advice from "if the bug gets fixed" to "when >> bumping the minimum meson version". > > I am very much not a fan of projects that do not build test > programs by default. > > If a dev is changing code and running 'ninja'/'make' everything > that is affected should be rebuilt to identify any build failures > that may have introduced immediately. This should include all > test binaries, regardless of whether the dev is intending to run > the tests at that time or not. > > We already have too many occassions when contributors submit > patches that have tests which fail to pass & this will expand > that problem with contributors submitting patches that fail > to even pass compilation of the tests.
I don't really understand this division between people who submit broken untested patches and people who submit broken untested patches. You do still need to test the patches and reject them for not passing the tests so no time is really saved. It strikes me as some kind of confusing optics-based objection, like this is about the exact embarrassment level of a broken patch. 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. > 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: `ninja all meson-test-prereq` instead of `ninja all` In fact users submitting patches could as well -- but then too, they could simply run tests for code they touched. 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. Automake works the same way -- tests can be excluded from `make && make install`, but get built on demand by `make check`. -- Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature