mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Probe $PROVE not $PERL while checking for modules needed by TAP tests.
Normally "prove" and "perl" come from the same Perl installation, but we support the case where they don't (mainly because the MSys buildfarm animals need this). In that case, AX_PROG_PERL_MODULES is completely the wrong thing to use, because it's checking what "perl" has. Instead, make a little TAP test script including the required modules, and run that under "prove". We don't need ax_prog_perl_modules.m4 at all after this change, so remove it. Back-patch to all supported branches, for the buildfarm's benefit. (In v10, this also back-patches the effects of commit 264eb03aa.) Andrew Dunstan and Tom Lane, per an observation by Noah Misch Discussion: https://postgr.es/m/E1moZHS-0002Cu-Ei@gemulon.postgresql.org
This commit is contained in:
26
configure.ac
26
configure.ac
@ -2345,21 +2345,25 @@ PGAC_PATH_PROGS(DBTOEPUB, dbtoepub)
|
||||
# Check for test tools
|
||||
#
|
||||
if test "$enable_tap_tests" = yes; then
|
||||
# Check for necessary modules, unless user has specified the "prove" to use;
|
||||
# in that case it's her responsibility to have a working configuration.
|
||||
# (prove might be part of a different Perl installation than perl, eg on
|
||||
# MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
|
||||
if test -z "$PROVE"; then
|
||||
# Test::More and Time::HiRes are supposed to be part of core Perl,
|
||||
# but some distros omit them in a minimal installation.
|
||||
AX_PROG_PERL_MODULES([IPC::Run Test::More=0.87 Time::HiRes], ,
|
||||
[AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])])
|
||||
fi
|
||||
# Now make sure we know where prove is
|
||||
# Make sure we know where prove is.
|
||||
PGAC_PATH_PROGS(PROVE, prove)
|
||||
if test -z "$PROVE"; then
|
||||
AC_MSG_ERROR([prove not found])
|
||||
fi
|
||||
# Check for necessary Perl modules. You might think we should use
|
||||
# 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)
|
||||
[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
|
||||
echo "$modulestderr" >&AS_MESSAGE_LOG_FD
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
# on failure, though, show the results to the user
|
||||
AC_MSG_RESULT([$modulestderr])
|
||||
AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])
|
||||
fi
|
||||
fi
|
||||
|
||||
# If compiler will take -Wl,--as-needed (or various platform-specific
|
||||
|
Reference in New Issue
Block a user