On 10/03/2026 12.47, Daniel P. Berrangé wrote:
Currently some heuristics are used to locate the build dir, if the
MESON_BUILD_ROOT environment variable is not set. These are not
entirely accurate, however, especially if the developer is using
nested sub-dirs under $PWD/build/...

Since the introduction of the 'run' script, we can ensure any
direct execution of the tests will have MESON_BUILD_ROOT set.

Meanwhile when meson runs the test it will also have this env
set. The only gap is when running pre-caching, and that is easily
fixed to set MESON_BUILD_ROOT.

It can thus be assumed that MESON_BUILD_ROOT will always be set
in any supported execution scenario, which allows the heuristics
to be removed.

Fair point. And in the worst case, it's always possible to set the env variable manually if you still want to run a test directly without the "run" script.

Reviewed-by: Thomas Huth <[email protected]>


Reply via email to