[PATCH] Fix install-tests target for vpath builds
Patch 0001 fixes this issue with vpath postgres builds:
$ make -C src/test/regress install-tests
/usr/bin/install: cannot create regular file
'PGPREFIX/lib/postgresql/regress/PGPREFIX/src/test/regress/expected/errors.out':
No such file or directory
make: *** [GNUmakefile:90: install-tests] Error 1
(where PGPREFIX is your --prefix)
It also makes the install-tests target a toplevel target for convenience.
Three related bonus patches are attached in case anyone thinks they're a
good idea:
- 0002 changes the install location of src/test/regress's install-tests
output files (sql/, expected/ etc) to $(pkglibdir)/pgxs/src/test/regress so
that PGXS resolves it as $(top_srcdir)/src/test/regress, same as for
in-tree builds. Presently it installs in $(pkglibdir)/regress/ for some
reason. This patch applies on top of 0001. It will affect packagers.
- 0003 makes the toplevel install-tests target also install
src/test/isolation test resources and the test modules. This patch applies
on top of either 0001 or 0002, depending on whether you want to include
0002.
- 0004 makes the dummy 'check' target in pgxs.mk optional for extensions
that define the new PGXS variable NO_DUMMY_CHECK_TARGET . This lets
extensions that want to define a 'check' target do so without having make
complain at them about redefined targets. This patch is independent of the
others and can apply on master directly.
--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise
Attachments:
0001-Fix-install-tests-target-for-vpath-builds.patchtext/x-patch; charset=US-ASCII; name=0001-Fix-install-tests-target-for-vpath-builds.patchDownload+4-4
0003-Support-the-install-tests-target-for-the-rest-of-the.patchtext/x-patch; charset=US-ASCII; name=0003-Support-the-install-tests-target-for-the-rest-of-the.patchDownload+104-9
0004-Make-the-dummy-check-target-in-PGXS-makefiles-option.patchtext/x-patch; charset=US-ASCII; name=0004-Make-the-dummy-check-target-in-PGXS-makefiles-option.patchDownload+6-1
0002-Move-installed-pg_regress-test-sources-to-pkglibdir-.patchtext/x-patch; charset=US-ASCII; name=0002-Move-installed-pg_regress-test-sources-to-pkglibdir-.patchDownload+13-3
On Thu, 23 Apr 2020 at 12:55, Craig Ringer <craig@2ndquadrant.com> wrote:
Patch 0001 fixes this issue with vpath postgres builds:
$ make -C src/test/regress install-tests
/usr/bin/install: cannot create regular file
'PGPREFIX/lib/postgresql/regress/PGPREFIX/src/test/regress/expected/errors.out':
No such file or directory
make: *** [GNUmakefile:90: install-tests] Error 1(where PGPREFIX is your --prefix)
It also makes the install-tests target a toplevel target for convenience.
Poke?
Anybody willing to pick up a vpath build fix?
--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise
On 4/23/20 12:55 AM, Craig Ringer wrote:
Patch 0001 fixes this issue with vpath postgres builds:
$ make -C src/test/regress install-tests
/usr/bin/install: cannot create regular file
'PGPREFIX/lib/postgresql/regress/PGPREFIX/src/test/regress/expected/errors.out':
No such file or directory
make: *** [GNUmakefile:90: install-tests] Error 1(where PGPREFIX is your --prefix)
It also makes the install-tests target a toplevel target for convenience.
Three related bonus patches are attached in case anyone thinks they're
a good idea:- 0002 changes the install location of src/test/regress's
install-tests output files (sql/, expected/ etc) to
$(pkglibdir)/pgxs/src/test/regress so that PGXS resolves it as
$(top_srcdir)/src/test/regress, same as for in-tree builds. Presently
it installs in $(pkglibdir)/regress/ for some reason. This patch
applies on top of 0001. It will affect packagers.- 0003 makes the toplevel install-tests target also install
src/test/isolation test resources and the test modules. This patch
applies on top of either 0001 or 0002, depending on whether you want
to include 0002.- 0004 makes the dummy 'check' target in pgxs.mk <http://pgxs.mk>
optional for extensions that define the new PGXS
variable NO_DUMMY_CHECK_TARGET . This lets extensions that want to
define a 'check' target do so without having make complain at them
about redefined targets. This patch is independent of the others and
can apply on master directly.
I've come up with a slightly nicer version of your patch 1, which I
propose to commit and backpatch before long.
I'll leave the others for another day. Let's revisit after we get
through the release.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
Fix-install-tests-target-for-vpath-builds-v2.patchtext/x-patch; charset=UTF-8; name=Fix-install-tests-target-for-vpath-builds-v2.patchDownload+3-2
On 2020-May-29, Andrew Dunstan wrote:
I've come up with a slightly nicer version of your patch 1, which I
propose to commit and backpatch before long.
Looks good to me.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services