1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Make configure check for a couple more Perl modules for --enable-tap-tests.

Red Hat's notion of a basic Perl installation doesn't include Test::More
or Time::HiRes, and reportedly some Debian installs also omit Time::HiRes.
Check for those during configure to spare the user the pain of digging
through check-world output to find out what went wrong.  While we're at it,
we should also check the version of Test::More, since TestLib.pm requires
at least 0.87.

In principle this could be back-patched, but it's probably not necessary.

Discussion: https://postgr.es/m/516.1521475003@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2018-03-20 15:16:16 -04:00
parent 94150513ec
commit 264eb03aab
2 changed files with 12 additions and 4 deletions

View File

@@ -2114,8 +2114,10 @@ if test "$enable_tap_tests" = yes; then
# (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
AX_PROG_PERL_MODULES(IPC::Run, ,
AC_MSG_ERROR([Perl module IPC::Run is required to run TAP tests]))
# 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
PGAC_PATH_PROGS(PROVE, prove)