Skip to content

Commit 264eb03

Browse files
committed
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/[email protected]
1 parent 9415051 commit 264eb03

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

configure

+8-2
Original file line numberDiff line numberDiff line change
@@ -16517,6 +16517,12 @@ if test "$enable_tap_tests" = yes; then
1651716517
# (prove might be part of a different Perl installation than perl, eg on
1651816518
# MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
1651916519
if test -z "$PROVE"; then
16520+
# Test::More and Time::HiRes are supposed to be part of core Perl,
16521+
# but some distros omit them in a minimal installation.
16522+
16523+
16524+
16525+
1652016526

1652116527

1652216528

@@ -16566,7 +16572,7 @@ fi
1656616572

1656716573
if test "x$PERL" != x; then
1656816574
ax_perl_modules_failed=0
16569-
for ax_perl_module in 'IPC::Run' ; do
16575+
for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
1657016576
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
1657116577
$as_echo_n "checking for perl module $ax_perl_module... " >&6; }
1657216578

@@ -16588,7 +16594,7 @@ $as_echo "ok" >&6; };
1658816594

1658916595
else
1659016596
:
16591-
as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
16597+
as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
1659216598
fi
1659316599
else
1659416600
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5

configure.in

+4-2
Original file line numberDiff line numberDiff line change
@@ -2114,8 +2114,10 @@ if test "$enable_tap_tests" = yes; then
21142114
# (prove might be part of a different Perl installation than perl, eg on
21152115
# MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
21162116
if test -z "$PROVE"; then
2117-
AX_PROG_PERL_MODULES(IPC::Run, ,
2118-
AC_MSG_ERROR([Perl module IPC::Run is required to run TAP tests]))
2117+
# Test::More and Time::HiRes are supposed to be part of core Perl,
2118+
# but some distros omit them in a minimal installation.
2119+
AX_PROG_PERL_MODULES([IPC::Run Test::More=0.87 Time::HiRes], ,
2120+
[AC_MSG_ERROR([Additional Perl modules are required to run TAP tests])])
21192121
fi
21202122
# Now make sure we know where prove is
21212123
PGAC_PATH_PROGS(PROVE, prove)

0 commit comments

Comments
 (0)