git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 69639e2)
Ensure the right perl is used for TAP tests on msys
2022年2月18日 21:59:30 +0000 (16:59 -0500)
2022年2月20日 16:51:44 +0000 (11:51 -0500)
In particular, perl with $Config{osname} = msys should only be used if
the build target is msys (which is currently buildable but not usable).
For builds targeted at native Windows, perl from the ucrt64 toolchain is
suitable.

Discussion: https://postgr.es/m/20220216210141.5glt5isg5qtwty4c@alap3.anarazel.de


diff --git a/config/check_modules.pl b/config/check_modules.pl
index cc0a7ab0e7a39a733413248e9b49de6224ff843f..470c3e9c144f4e177c2f7313e783746d8d1726e1 100644 (file)
--- a/config/check_modules.pl
+++ b/config/check_modules.pl
@@ -6,6 +6,7 @@
#
use strict;
use warnings;
+use Config;
use IPC::Run 0.79;
@@ -19,5 +20,9 @@ diag("IPC::Run::VERSION: $IPC::Run::VERSION");
diag("Test::More::VERSION: $Test::More::VERSION");
diag("Time::HiRes::VERSION: $Time::HiRes::VERSION");
+# Check that if prove is using msys perl it is for an msys target
+ok(($ENV{__CONFIG_HOST_OS__} || "") eq 'msys',
+ "Msys perl used for correct target")
+ if $Config{osname} eq 'msys';
ok(1);
done_testing();
diff --git a/configure b/configure
index ca890b8b07ebdcebcc98ebbbc33bc4e272fa2321..f3cb5c2b5117c421aca6d6b80397e06ec87affae 100755 (executable)
--- a/configure
+++ b/configure
@@ -19758,6 +19758,7 @@ fi
# installation than perl, eg on MSys, so we have to check using prove.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
$as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
+ __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
if test $? -eq 0; then
# log the module version details, but don't show them interactively
diff --git a/configure.ac b/configure.ac
index 331683b33635b447dee338ed65b88b8dc490a1a3..19d1a803673f96f30e3cc103fe244953aceea6fe 100644 (file)
--- a/configure.ac
+++ b/configure.ac
@@ -2432,6 +2432,7 @@ if test "$enable_tap_tests" = yes; then
# AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
# installation than perl, eg on MSys, so we have to check using prove.
AC_MSG_CHECKING(for Perl modules required for TAP tests)
+ __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
[modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`]
if test $? -eq 0; then
# log the module version details, but don't show them interactively
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /