On 13 September 2016 at 22:02, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Craig Ringer <craig@2ndquadrant.com> writes:
>> While updating an extension for 9.6 I noticed that while the
>> $(prove_check) definition is exposed for use by PGXS in
>> Makefile.global, extensions can't actually use the TAP tests because
>> we don't install the required Perl modules like PostgresNode.pm.
Whoops, I managed to misplace this thread.
>> I don't see any reason not to make this available to extension authors
>> and doing so is harmless, so here's a small patch to install it. I
>> think it's reasonable to add this to 9.6 even at this late stage; IMO
>> it should've been installed from the beginning.
>
> Without taking a position on the merits of this patch per se, I'd like
> to say that I find the argument for back-patching into 9.6 and not
> further than that to be pretty dubious. $(prove_check) has been there
> since 9.4, and in the past we've often regretted it when we failed
> to back-patch TAP infrastructure fixes all the way back to 9.4.
No objection to backpatching, I just thought I'd be more intrusive to
do that than just 9.6.
Since 9.5 and older have more limited versions of PostgresNode which
lack safe_psql, etc, I'm not sure it's very practical for extensions
to bother running TAP tests on 9.4 and 9.5 anyway.
I'd love to be able to, but unless we backport the new src/test/perl
stuff and the changes to the rest of the TAP tests to make them work
with it I don't see it being very useful. Since that's really not
going to fly, I say this should just go in 9.6.
Extension authors can just use:
ifeq ($(MAJORVERSION),9.6)
endif
when defining their prove rules.
Not beautiful, but when it wasn't really designed from the start to
work with PGXS I don't see much alternative.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services