]> git.ipfire.org Git - thirdparty/bind9.git/commit
Simplify maintenance of NO_BUILD_TEST_PREREQ CI hack
authorPetr Špaček <pspacek@isc.org>
Wed, 25 Jun 2025 15:53:25 +0000 (17:53 +0200)
committerPetr Špaček <pspacek@isc.org>
Thu, 26 Jun 2025 12:43:17 +0000 (14:43 +0200)
commit052269a357a11ab230cef2a26c69fb216f310a35
tree0ba318d2394a8314a92fe62898831c4cae97bfcc
parentae67c70be7ae2a1c9e61e65e7724709666a897c7
Simplify maintenance of NO_BUILD_TEST_PREREQ CI hack

Our split between build and test phases in CI triggers odd corner case
in Meson:
- Newer Meson versions (1.7.0+) do not build test targets as part of
  "all" target.
- We copy build artifacts from build phase into test container.
- meson test --no-rebuild does not build test artifacts even if they are
  missing.
- To build these test binaries Meson has special target
  "meson-test-prereq". This target exists only in Meson >= 0.63.
- Ubuntu 22.04 has only Meson 0.61.2 so this target does not exist.

To counter this problem, we introduced BUILD_TEST_PREREQ variable in CI
to explicitly build "meson-test-prereq" target in the "build" phase only
inside images with new-enough Meson versions. This worked, but it forced
us to keep track of Meson versions on various
distros and update the variable accordingly.

This commit inverts the logic so we build the special target by default
(in the build phase) and skip building it only if Meson version is too
old. So once we drop the old image, the variable (or rather it's usage)
will be gone and we don't need to touch it for newer images.

We have also considered installing newer Meson into the test image, but
decided to keep the old version around so we can test minimal Meson
version specified in meson.build file.
.gitlab-ci.yml