Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit32ce58e

Browse files
committed
Make test portlock logic work with meson
Previously the portlock logic, added in9b4eafc, didn't actually workproperly when the tests were run via meson.9b4eafc used theMESON_BUILD_ROOT environment variable to determine the directory for the portlock directory, but that's never set for running the tests. That meant thateach test used its own portlock dir, unless the PG_TEST_PORT_DIR environmentvariable was set.Fix the problem by setting top_builddir for the environment. That's also usedfor 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
1 parent665cafe commit32ce58e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3401,6 +3401,8 @@ test_initdb_template = meson.build_root() / 'tmp_install' / 'initdb-template'
34013401
test_env.set('PG_REGRESS', pg_regress.full_path())
34023402
test_env.set('REGRESS_SHLIB', regress_module.full_path())
34033403
test_env.set('INITDB_TEMPLATE', test_initdb_template)
3404+
# for Cluster.pm's portlock logic
3405+
test_env.set('top_builddir',meson.build_root())
34043406

34053407
# Add the temporary installation to the library search path on platforms where
34063408
# that works (everything but windows, basically). On windows everything

‎src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ INIT
168168
$portdir =$ENV{PG_TEST_PORT_DIR};
169169
# Otherwise, try to use a directory at the top of the build tree
170170
# or as a last resort use the tmp_check directory
171-
my$build_dir =
172-
$ENV{MESON_BUILD_ROOT}
173-
||$ENV{top_builddir}
171+
my$build_dir =$ENV{top_builddir}
174172
||$PostgreSQL::Test::Utils::tmp_check;
175173
$portdir ||="$build_dir/portlock";
176174
$portdir =~s!\\!/!g;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp