From: Patrick Steinhardt Date: Mon, 5 May 2025 10:55:45 +0000 (+0200) Subject: ci: fix aggregation of test results with Meson X-Git-Tag: v2.50.0-rc0~46^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd38ed5be1fdee42af285e8eb28eb7397168a473;p=thirdparty%2Fgit.git ci: fix aggregation of test results with Meson Our CI needs to be aware of the location of the test output directory so that it knows where to find test results. Some of our CI jobs achieve this by setting the `TEST_OUTPUT_DIRECTORY` environment variable, which ensures that the output will be written to that directory. Other jobs, especially on GitHub Workflows, don't set that environment variable and instead expect test results to be located in the source directory in "t/". The latter logic does not work with Meson though, as the test results are not written into the source directory by default, but instead into the build directory. As such, any job that uses Meson without setting the environment variable will be unable to locate and aggregate results. Fix this by explicitly setting the test output directory when we set up the Meson build directory. Like this, we can easily default to "t/" in the source directory when the value hasn't been set explicitly. Reported-by: Johannes Schindelin Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh index 1c69846723..1e17e2ed90 100755 --- a/ci/run-build-and-tests.sh +++ b/ci/run-build-and-tests.sh @@ -57,6 +57,7 @@ case "$jobname" in --warnlevel 2 --werror \ --wrap-mode nofallback \ -Dfuzzers=true \ + -Dtest_output_directory="${TEST_OUTPUT_DIRECTORY:-$(pwd)/t}" \ $MESONFLAGS group "Build" meson compile -C build -- if test -n "$run_tests"