diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-03-20 15:16:16 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-03-20 15:16:16 -0400 |
commit | 264eb03aab067da6db2a0de907a8421ce6865d60 (patch) | |
tree | 3e0d8bb727f94bd7b1ada803afdfbf0fd7d821b4 | |
parent | 94150513ec12c13eb7c98430fc34f477896d38c9 (diff) | |
download | postgresql-264eb03aab067da6db2a0de907a8421ce6865d60.tar.gz postgresql-264eb03aab067da6db2a0de907a8421ce6865d60.zip |
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
-rwxr-xr-x | configure | 10 | ||||
-rw-r--r-- | configure.in | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/configure b/configure index 3943711283a..1be8a1ab317 100755 --- a/configure +++ b/configure @@ -16517,6 +16517,12 @@ 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 + # Test::More and Time::HiRes are supposed to be part of core Perl, + # but some distros omit them in a minimal installation. + + + + @@ -16566,7 +16572,7 @@ fi if test "x$PERL" != x; then ax_perl_modules_failed=0 - for ax_perl_module in 'IPC::Run' ; do + for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5 $as_echo_n "checking for perl module $ax_perl_module... " >&6; } @@ -16588,7 +16594,7 @@ $as_echo "ok" >&6; }; else : - as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5 + as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5 diff --git a/configure.in b/configure.in index 1babdbb755a..9a6f4b193c4 100644 --- a/configure.in +++ b/configure.in @@ -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) |