Ensure the right perl is used for TAP tests on msys

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
pull/78/head
Andrew Dunstan 3 years ago
parent 69639e2b5c
commit cf12541f2b
No known key found for this signature in database
GPG Key ID: 99FA7FCB59FC3B81
  1. 5
      config/check_modules.pl
  2. 1
      configure
  3. 1
      configure.ac

@ -6,6 +6,7 @@
# #
use strict; use strict;
use warnings; use warnings;
use Config;
use IPC::Run 0.79; use IPC::Run 0.79;
@ -19,5 +20,9 @@ diag("IPC::Run::VERSION: $IPC::Run::VERSION");
diag("Test::More::VERSION: $Test::More::VERSION"); diag("Test::More::VERSION: $Test::More::VERSION");
diag("Time::HiRes::VERSION: $Time::HiRes::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); ok(1);
done_testing(); done_testing();

1
configure vendored

@ -19758,6 +19758,7 @@ fi
# installation than perl, eg on MSys, so we have to check using prove. # 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 "$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; } $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` modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
if test $? -eq 0; then if test $? -eq 0; then
# log the module version details, but don't show them interactively # log the module version details, but don't show them interactively

@ -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 # 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. # installation than perl, eg on MSys, so we have to check using prove.
AC_MSG_CHECKING(for Perl modules required for TAP tests) 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`] [modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`]
if test $? -eq 0; then if test $? -eq 0; then
# log the module version details, but don't show them interactively # log the module version details, but don't show them interactively

Loading…
Cancel
Save