meson: Add missing dependencies for libpq tests
authorAndres Freund <andres@anarazel.de>
Tue, 4 Feb 2025 22:45:57 +0000 (17:45 -0500)
committerAndres Freund <andres@anarazel.de>
Tue, 4 Feb 2025 22:56:20 +0000 (17:56 -0500)
commit73ed502ea67779aedd335a8c322c3c9eef3c77b3
treebbd2ce966467d5d0f72957b769274aca4fac6f95
parent09df23cf321e558376f8e24d4e890900098b0c28
meson: Add missing dependencies for libpq tests

The missing dependency was, e.g., visible when doing
  ninja clean && ninja meson-test-prereq && meson test --no-rebuild --suite setup --suite libpq

This is a bit more complicated than other related fixes, because until now
libpq's tests depended on 'frontend_code', which includes a dependency on
fe_utils, which in turns on libpq. That in turn required
src/interfaces/libpq/test to be entered from the top-level, not from
libpq/meson.build.  Because of that the test definitions in libpq/meson.build
could not declare a dependency on the binaries defined in
libpq/test/meson.build.

To fix this, this commit creates frontend_no_fe_utils_code, which allows us to
recurse into libpq/test from withing libpq/meson.build.

Apply this to all branches with meson support, as part of an effort to fix
incorrect test dependencies that can lead to test failures.

Discussion: https://postgr.es/m/CAGECzQSvM3iSDmjF+=Kof5an6jN8UbkP_4cKKT9w6GZavmb5yQ@mail.gmail.com
Discussion: https://postgr.es/m/bdba588f-69a9-4f3e-9b95-62d07210a32e@eisentraut.org
Backpatch: 16-, where meson support was added
meson.build
src/interfaces/libpq/meson.build
src/interfaces/libpq/test/meson.build