Re: Small PATCH: check of 2 Perl modules

From: Eugene Kazakov <e(dot)kazakov(at)postgrespro(dot)ru>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small PATCH: check of 2 Perl modules
Date: 2016-02-15 12:50:48
Message-ID: 56C1C9A8.5070604@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

13.02.2016 16:04, Michael Paquier :
> On Sat, Feb 13, 2016 at 1:47 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Fri, Feb 12, 2016 at 8:20 AM, Eugene Kazakov
>> <e(dot)kazakov(at)postgrespro(dot)ru> wrote:
>>> TAP-tests need two Perl modules: Test::More and IPC::Run.
>>>
>>> The patch adds checking of modules in configure.in and configure.
>> Why would we want that?
> I was doubtful at the beginning, but it doesn't hurt to have those
> sanity checks in configure actually. The idea is that when
> --enable-tap-tests is used now we simply error with "Can't locate
> IPC/Run.pm in @INC" when kicking the tests, this check would allow one
> to know if his environment is adapted to run the tests or not before
> compiling anything.
>
> And with this patch, we would fail now with that:
> configure: error: Need Perl IPC::Run module
>
> By the way, the patch given upthread by Eugene is incorrect. To begin
> with, AX_PROG_PERL_MODULES has not been compiled by autoconf and I
> can't believe that it is available on all platforms, for example on
> OSX 10.8 I could not see it. And it is actually here:
> https://www.gnu.org/software/autoconf-archive/ax_prog_perl_modules.html
>
> I would recommend grabbing a copy of this file, and change the error
> message as follows:
> Perl module IPC::Run is required to run TAP tests
>
> See the patch attached as reference, we could simplify the macro of
> this m4 file and remove the check for perl, which is here:
> +# Make sure we have perl
> +if test -z "$PERL"; then
> +AC_CHECK_PROG(PERL,perl,perl)
> +fi
> Though I kept the original script as-is in the patch attached.
> Regards,
Michael,

Thank you. You are right, of course. I missed the
m4_ax_prog_perl_modules. Please, see the fixed version of patch in the
attach. I added m4_ax_prog_perl_modules and change the error messages.

The best regards,
Eugene Kazakov,
Postgres Professional

Attachment Content-Type Size
configure-tap-modules-v3 text/plain 5.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vitaly Burovoy 2016-02-15 13:09:39 Re: custom function for converting human readable sizes to bytes
Previous Message Artur Zakirov 2016-02-15 12:43:57 Re: IF (NOT) EXISTS in psql-completion