Re: how to handle missing "prove"

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: how to handle missing "prove"
Date: 2014-10-29 02:01:46
Message-ID: 54504A8A.1090202@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/28/14 9:16 PM, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Here is a patch to use "missing" to handle the case when "prove" is not
>> present.
>
> Wouldn't it be easier to do what we do for Perl, viz in Makefile.global.in
>
> ifneq (@PERL@,)
> # quoted to protect pathname with spaces
> PERL = '@PERL@'
> else
> PERL = $(missing) perl
> endif

Yeah, maybe.

> However, with either of these approaches, "make check-world" gets a hard
> failure if you lack "prove". Is that what we want? It's certainly not
> very consistent with what you've been doing to make the tests just slide
> by (rather than fail on) missing/too old Perl modules.

The patch has

-$(missing) prove

and the - will make make ignore failures. Admittedly, that is very well
hidden.

> ISTM that the project policy for external components like this has been
> "don't rely on them unless user says to use them, in which case fail if
> they aren't present". So perhaps what we ought to have is a configure
> switch along the lines of "--enable-tap-tests". If you don't specify it,
> prove_check expands to nothing. If you do specify it, we fail if we
> lack any of the expected support, both "prove" and whatever the agreed-on
> set of Perl modules is.

That's also a good idea.

(I might think of a different option name, because "TAP" is an output
format, not a piece of software. pg_regress could output TAP as well,
for example.)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-10-29 02:06:36 Re: how to handle missing "prove"
Previous Message Peter Eisentraut 2014-10-29 01:46:51 Re: Directory/File Access Permissions for COPY and Generic File Access Functions