Make test portlock logic work with meson
authorAndres Freund <andres@anarazel.de>
Fri, 21 Feb 2025 16:16:57 +0000 (11:16 -0500)
committerAndres Freund <andres@anarazel.de>
Fri, 21 Feb 2025 16:25:05 +0000 (11:25 -0500)
commit32ce58e9e97723958d43e09fc3203a302c1eb4b5
treefac189ba1ede2814c3ffb6ff1066cc0bb4f7c88e
parent665cafe8a4bd23b4f14194b0671d3ef09dc55864
Make test portlock logic work with meson

Previously the portlock logic, added in 9b4eafcaf41, didn't actually work
properly when the tests were run via meson. 9b4eafcaf41 used the
MESON_BUILD_ROOT environment variable to determine the directory for the port
lock directory, but that's never set for running the tests.  That meant that
each test used its own portlock dir, unless the PG_TEST_PORT_DIR environment
variable was set.

Fix the problem by setting top_builddir for the environment. That's also used
for the autoconf/make build.

Backpatch back to 16, where meson support was added.

Reported-by: Zharkov Roman <r.zharkov@postgrespro.ru>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Backpatch-through: 16
meson.build
src/test/perl/PostgreSQL/Test/Cluster.pm