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

Commit7f61882

Browse files
committed
Support absolute bindir/libdir in regression tests with meson
Passing an absolute bindir/libdir will install the binaries andlibraries to <build>/tmp_install/<bindir> and<build>/tmp_install/<libdir> respectively.This path is correctly passed to the regression test suite viaconfigure/make, but not via meson, yet. This is because the "/"operator in the following expression throws away the whole left sidewhen the right side is an absolute path: test_install_location / get_option('libdir')This was already correctly handled for dir_prefix, which is likelyabsolute as well. This patch handles both bindir and libdir in thesame way - prefixing absolute paths with the tmp_install pathcorrectly.Author: Wolfgang WaltherReviewed-by: Nazir Bilal Yavuz, Alvaro Herrera, Peter EisentrautReviewed-by: Tristan PartinDiscussion:https://www.postgresql.org/message-id/ca8f37e1-a2c3-40e2-91f6-59c3d3652ad4@technowledgy.deBackpatch: 16-, where meson support was added
1 parent23be520 commit7f61882

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎meson.build‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,15 +3138,17 @@ test_install_destdir = meson.build_root() / 'tmp_install/'
31383138
if build_system!='windows'
31393139
# On unixoid systems this is trivial, we just prepend the destdir
31403140
assert(dir_prefix.startswith('/'))# enforced by meson
3141-
test_install_location='@0@@1@'.format(test_install_destdir, dir_prefix)
3141+
temp_install_bindir='@0@@1@'.format(test_install_destdir, dir_prefix/ dir_bin)
3142+
temp_install_libdir='@0@@1@'.format(test_install_destdir, dir_prefix/ dir_lib)
31423143
else
31433144
# drives, drive-relative paths, etc make this complicated on windows, call
31443145
# into a copy of meson's logic for it
31453146
command= [
31463147
python,'-c',
31473148
'import sys; from pathlib import PurePath; d1=sys.argv[1]; d2=sys.argv[2]; print(str(PurePath(d1, *PurePath(d2).parts[1:])))',
3148-
test_install_destdir, dir_prefix]
3149-
test_install_location=run_command(command,check:true).stdout().strip()
3149+
test_install_destdir]
3150+
temp_install_bindir=run_command(command, dir_prefix/ dir_bin,check:true).stdout().strip()
3151+
temp_install_libdir=run_command(command, dir_prefix/ dir_lib,check:true).stdout().strip()
31503152
endif
31513153

31523154
meson_install_args= meson_args+ ['install']+ {
@@ -3183,7 +3185,7 @@ testport = 40000
31833185

31843186
test_env=environment()
31853187

3186-
temp_install_bindir=test_install_location/get_option('bindir')
3188+
test_initdb_template=meson.build_root()/'tmp_install'/'initdb-template'
31873189
test_env.set('PG_REGRESS', pg_regress.full_path())
31883190
test_env.set('REGRESS_SHLIB', regress_module.full_path())
31893191

@@ -3196,7 +3198,7 @@ test_env.set('PG_TEST_EXTRA', get_option('PG_TEST_EXTRA'))
31963198
# that works (everything but windows, basically). On windows everything
31973199
# library-like gets installed into bindir, solving that issue.
31983200
if library_path_var!=''
3199-
test_env.prepend(library_path_var,test_install_location/get_option('libdir'))
3201+
test_env.prepend(library_path_var,temp_install_libdir)
32003202
endif
32013203

32023204

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp