From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Very confusing installcheck behavior with PGXS
Date: Sun, 3 Jan 2016 16:22:46 -0600
Message-ID: <56899F36.9000607@BlueTreble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
The rule that gets executed if you do `make installcheck` with something
using PGXS is
pgxs.mk: $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
where $(pg_regress_installcheck) is set in Makefile.global.in to
> pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --bindir='$(bindir)' $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS)
The problem here is that in a PGXS make, srcdir is set to '.'[1], and
--inputdir is specified a second time in REGRESS_OPTS. Normally that
works OK (for some reason ignoring what's in ./sql), but if you happen
to have a file in your test/sql directory that matches a file in ./sql,
pg_regress runs the first file and not the second.
Presumably that's exactly what you'd want in most of the tree, but it's
definitely not what you want in an extension.
Is the best way to fix this to add a pg_regress_installcheck_pgxs
variable in Makefile.global.in and modify pgxs.mk accordingly?
[1]:
> decibel@decina:[16:18]~/git/trunklet (master=)$make print-pg_regress_installcheck print-REGRESS_OPTS print-REGRESS
> pg_regress_installcheck = /Users/decibel/pgsql/9.4/i/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --psqldir=/Users/decibel/pgsql/9.4/i/bin
> REGRESS_OPTS = --inputdir=test --load-language=plpgsql --dbname=contrib_regression
> REGRESS = all build
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: Jim.Nasby@BlueTreble.com
Subject: Re: Very confusing installcheck behavior with PGXS
In-Reply-To: <56899F36.9000607@BlueTreble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox