9.6 TAP tests and extensions

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: 9.6 TAP tests and extensions
Date: 2016-09-13 03:59:41
Message-ID: CAMsr+YFXv+2qne6xJW7z_25mYBtktRX5rpkrgrb+DRgQ_FxgHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all

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.

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. They're only installed
if --enable-tap-tests is set, since otherwise $(prove_check) will just
error out with "TAP tests not enabled" anyway.

Not having this in 9.6 will make it way harder for extension authors
to benefit from the new TAP tooling.

Another patch allows the isolation tester to be installed too, again
so that extensions can use it.

The final patch just adds a comment to src/test/Makefile to warn that
src/Makefile doesn't call it directly, because I was confused as to
why 'make -C src/test install' installed everything, but 'make
install' did not.

Sorry this is so late in the piece. It only came up when I switched
from 10.0 dev/review to updating extensions for 9.6. But it's just
adding installed files and I think it's worth doing.

Another small patch (pending) will be needed because we look for
pg_regress in the wrong place when running out-of-tree with
$(prove_installcheck).

Can't exec "/home/craig/projects/2Q/postgres-bdr-extension//home/craig/pg/96/lib/postgresql/pgxs/src/makefiles/../../src/test/regress/pg_regress":
No such file or directory at
/home/craig/pg/96/lib/postgresql/pgxs/src/makefiles/../../src/test/perl/TestLib.pm
line 151.

$(prove_check) won't be usable because it assumes a temp install in
./tmp_install but that's to be expected.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Install-the-Perl-TAP-tests.patch text/x-patch 2.6 KB
0002-Add-install-rules-for-isolation-tester.patch text/x-patch 1.6 KB
0003-Note-that-src-test-Makefile-is-not-called-from-src-M.patch text/x-patch 833 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-09-13 04:16:58 Re: pg_basebackup, pg_receivexlog and data durability (was: silent data loss with ext4 / all current versions)
Previous Message Andres Freund 2016-09-13 02:55:19 Re: 9.6 TAP tests and extensions