From: Tom Lane <tgl@sss.pgh.pa.us>
To: ilmari@ilmari.org
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: configure's checks for --enable-tap-tests are insufficient
Date: Tue, 20 Mar 2018 14:04:50 -0400
Message-ID: <19714.1521569090@sss.pgh.pa.us> (raw)
In-Reply-To: <d8j1sgepsoh.fsf@dalvik.ping.uio.no>
References: <516.1521475003@sss.pgh.pa.us>
<CAMsr+YHe6KXwqQf6pJaQx_Ny2AkeA40i31y6JGDpFJ__ZOKZDQ@mail.gmail.com>
<8906.1521513602@sss.pgh.pa.us>
<d8jefkfoufg.fsf@dalvik.ping.uio.no>
<9696.1521554152@sss.pgh.pa.us>
<d8ja7v2q10v.fsf@dalvik.ping.uio.no>
<12134.1521556826@sss.pgh.pa.us>
<d8j605qpujo.fsf@dalvik.ping.uio.no>
<30398.1521564644@sss.pgh.pa.us>
<d8j1sgepsoh.fsf@dalvik.ping.uio.no>
ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:
> Tom Lane <tgl@sss.pgh.pa.us> 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
Attachments:check-for-more-perl-modules-in-configure.patch (text/x-diff, 2.7K) downloaddiff --git a/configure b/configureindex 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.inindex 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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, ilmari@ilmari.org, craig@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: configure's checks for --enable-tap-tests are insufficient
In-Reply-To: <19714.1521569090@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox