summaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-02-21 11:16:57 -0500
committerAndres Freund <andres@anarazel.de>2025-02-21 11:25:48 -0500
commit0f7c0fb59cb71e1ecd45c6892ab184fefbfde8be (patch)
tree5641248ea150b2dcffb3aa736eb7d33b9f762d95 /src/test/perl/PostgreSQL
parent310907aaf01053bbc00972a01438997b146b3fdd (diff)
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
Diffstat (limited to 'src/test/perl/PostgreSQL')
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 7e97cc6e66e..f2d9afd398f 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -167,9 +167,7 @@ INIT
$portdir = $ENV{PG_TEST_PORT_DIR};
# Otherwise, try to use a directory at the top of the build tree
# or as a last resort use the tmp_check directory
- my $build_dir =
- $ENV{MESON_BUILD_ROOT}
- || $ENV{top_builddir}
+ my $build_dir = $ENV{top_builddir}
|| $PostgreSQL::Test::Utils::tmp_check;
$portdir ||= "$build_dir/portlock";
$portdir =~ s!\\!/!g;