[email protected] (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:
> Tom Lane <[email protected]> writes:
>> I just want to test for modules that we know are likely to be omitted
>> on popular platforms. I've proposed testing two that would improve
>> the user experience on Red Hat; what's the equivalent minimum set for
>> Debian?
> On Debian (I've checked the previous and current stable releases, as
> well as unstable) the only package required by the TAP tests not in
> perl-base is Time::HiRes. Of the modules required by PL/Perl, Opcode is
> not in perl-base either.
Ah, thanks. Not sure we need to make an explicit test for Opcode; we've
not heard of anyone not having that.
> BTW, should include the version in the Test::More check, since we only
> requie Perl 5.8, but that only shipped Test::More 0.47, while we require
> 0.97.
Good point, though it looks to me like we're requiring 0.87 not 0.97?
Anyway, I propose the attached. It produces output like
checking for perl module IPC::Run... ok
checking for perl module Test::More 0.87... no
checking for perl module Time::HiRes... ok
configure: error: Additional Perl modules are required to run TAP tests
which seems a better approach to me than making the user find out one
at a time which modules are needed.
regards, tom lane
diff --git a/configure b/configure
index 3943711..1be8a1a 100755
*** a/configure
--- b/configure
*************** if test "$enable_tap_tests" = yes; then
*** 16517,16522 ****
--- 16517,16528 ----
# (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.
+
+
+
+
*************** fi
*** 16566,16572 ****
if test "x$PERL" != x; then
ax_perl_modules_failed=0
! for ax_perl_module in 'IPC::Run' ; 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; }
--- 16572,16578 ----
if test "x$PERL" != x; then
ax_perl_modules_failed=0
! 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; }
*************** $as_echo "ok" >&6; };
*** 16588,16594 ****
else
:
! as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
--- 16594,16600 ----
else
:
! 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 1babdbb..9a6f4b1 100644
*** a/configure.in
--- b/configure.in
*************** if test "$enable_tap_tests" = yes; then
*** 2114,2121 ****
# (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]))
fi
# Now make sure we know where prove is
PGAC_PATH_PROGS(PROVE, prove)
--- 2114,2123 ----
# (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
PGAC_PATH_PROGS(PROVE, prove)