Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aZf4s-0001MU-AJ for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Feb 2016 13:38:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aZf4r-0005Qa-TW for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Feb 2016 13:38:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aZf4j-00058x-Gu for pgsql-hackers@postgresql.org; Sat, 27 Feb 2016 13:38:25 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aZf4g-0007f3-Ny for pgsql-hackers@postgresql.org; Sat, 27 Feb 2016 13:38:24 +0000 Received: from mfilter13-d.gandi.net (mfilter13-d.gandi.net [217.70.178.141]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 95637A80AA; Sat, 27 Feb 2016 14:38:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter13-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter13-d.gandi.net (mfilter13-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id Oof6LxDOfIvu; Sat, 27 Feb 2016 14:38:17 +0100 (CET) X-Originating-IP: 98.122.164.227 Received: from [192.168.10.146] (unknown [98.122.164.227]) (Authenticated sender: adsend@dunslane.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 39BA3A80CB; Sat, 27 Feb 2016 14:38:16 +0100 (CET) Subject: Re: [COMMITTERS] pgsql: Respect TEMP_CONFIG when running contrib regression tests. To: Robert Haas References: <56D0F2AE.6000003@dunslane.net> <20160227021704.qpesqyne3j4fhode@alap3.anarazel.de> <56D1183E.2090207@dunslane.net> Cc: Andres Freund , "pgsql-hackers@postgresql.org" From: Andrew Dunstan Message-ID: <56D1A6C6.1000801@dunslane.net> Date: Sat, 27 Feb 2016 08:38:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------010301030109070801020201" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------010301030109070801020201 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 02/26/2016 10:59 PM, Robert Haas wrote: > On Sat, Feb 27, 2016 at 9:00 AM, Andrew Dunstan wrote: >>> Sure. Saving three lines of Makefile duplication is hardly a >>> world-shattering event, so I thought there might be some other >>> purpose. But I'm not against saving three lines of duplication >>> either, if it won't break anything. >> The point is that we should do this for several other test sets as well as >> contrib - isolation tests, PL tests and ecpg tests. > OK, I was wondering about that. I can try to write a patch, or > someone else can, but if you already understand what needs to be done, > perhaps you should just go ahead. > What I had in mind was something like the attached. In testing this seems to do the right thing, and the nice part is that it will be picked up by the buildfarm in the one case that's relevant, namely the ecpg tests. The only fly in the ointment is that there are a few places that set --temp-config explicitly: ./contrib/test_decoding/Makefile: --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \ ./contrib/test_decoding/Makefile: --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \ ./src/test/modules/commit_ts/Makefile:REGRESS_OPTS = --temp-config=$(top_srcdir)/src/test/modules/commit_ts/commit_ts.conf ./src/test/modules/test_rls_hooks/Makefile:REGRESS_OPTS = --temp-config=$(top_srcdir)/src/test/modules/test_rls_hooks/rls_hooks.conf Perhaps what we need to do is modify pg_regress.c slightly to allow more than one --temp-config argument. But that could be done later. cheers andrew --------------010301030109070801020201 Content-Type: text/x-patch; name="regress-temp-config.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="regress-temp-config.patch" diff --git a/contrib/contrib-global.mk b/contrib/contrib-global.mk index ba49610..6ac8e9b 100644 --- a/contrib/contrib-global.mk +++ b/contrib/contrib-global.mk @@ -1,9 +1,4 @@ # contrib/contrib-global.mk -# file with extra config for temp build -ifdef TEMP_CONFIG -REGRESS_OPTS += --temp-config=$(TEMP_CONFIG) -endif - NO_PGXS = 1 include $(top_srcdir)/src/makefiles/pgxs.mk diff --git a/src/Makefile.global.in b/src/Makefile.global.in index e94d6a5..47b265e 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -524,14 +524,20 @@ ifdef NO_LOCALE NOLOCALE += --no-locale endif +# file with extra config for temp build +TEMP_CONF = +ifdef TEMP_CONFIG +TEMP_CONF += --temp-config=$(TEMP_CONFIG) +endif + pg_regress_locale_flags = $(if $(ENCODING),--encoding=$(ENCODING)) $(NOLOCALE) -pg_regress_check = $(with_temp_install) $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-instance=./tmp_check --bindir= $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS) +pg_regress_check = $(with_temp_install) $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS) pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --bindir='$(bindir)' $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS) pg_regress_clean_files = results/ regression.diffs regression.out tmp_check/ log/ -pg_isolation_regress_check = $(with_temp_install) $(top_builddir)/src/test/isolation/pg_isolation_regress --inputdir=$(srcdir) --temp-instance=./tmp_check --bindir= $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS) +pg_isolation_regress_check = $(with_temp_install) $(top_builddir)/src/test/isolation/pg_isolation_regress --inputdir=$(srcdir) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS) pg_isolation_regress_installcheck = $(top_builddir)/src/test/isolation/pg_isolation_regress --inputdir=$(srcdir) $(pg_regress_locale_flags) $(EXTRA_REGRESS_OPTS) ########################################################################## diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile index a4ac021..4ed785b 100644 --- a/src/interfaces/ecpg/test/Makefile +++ b/src/interfaces/ecpg/test/Makefile @@ -78,11 +78,11 @@ endif REGRESS_OPTS = --dbname=regress1,connectdb --create-role=connectuser,connectdb $(EXTRA_REGRESS_OPTS) check: all - $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule + $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule # the same options, but with --listen-on-tcp checktcp: all - $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --host=localhost + $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --host=localhost installcheck: all ./pg_regress $(REGRESS_OPTS) --bindir='$(bindir)' $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile index 4577509..3d272d5 100644 --- a/src/test/isolation/Makefile +++ b/src/test/isolation/Makefile @@ -55,7 +55,7 @@ installcheck: all ./pg_isolation_regress --bindir='$(bindir)' $(EXTRA_REGRESS_OPTS) --inputdir=$(srcdir) --schedule=$(srcdir)/isolation_schedule check: all - $(with_temp_install) ./pg_isolation_regress --temp-instance=./tmp_check --inputdir=$(srcdir) --bindir= $(EXTRA_REGRESS_OPTS) --schedule=$(srcdir)/isolation_schedule + $(with_temp_install) ./pg_isolation_regress --temp-instance=./tmp_check $(TEMP_CONF) --inputdir=$(srcdir) --bindir= $(EXTRA_REGRESS_OPTS) --schedule=$(srcdir)/isolation_schedule # Versions of the check tests that include the prepared_transactions test # It only makes sense to run these if set up to use prepared transactions, @@ -65,4 +65,4 @@ installcheck-prepared-txns: all temp-install ./pg_isolation_regress --bindir='$(bindir)' $(EXTRA_REGRESS_OPTS) --inputdir=$(srcdir) --schedule=$(srcdir)/isolation_schedule prepared-transactions check-prepared-txns: all temp-install - ./pg_isolation_regress --temp-instance=./tmp_check $(EXTRA_REGRESS_OPTS) --inputdir=$(srcdir) --schedule=$(srcdir)/isolation_schedule prepared-transactions + ./pg_isolation_regress --temp-instance=./tmp_check $(TEMP_CONF) $(EXTRA_REGRESS_OPTS) --inputdir=$(srcdir) --schedule=$(srcdir)/isolation_schedule prepared-transactions diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile index 204099a..4f55f52 100644 --- a/src/test/regress/GNUmakefile +++ b/src/test/regress/GNUmakefile @@ -17,12 +17,6 @@ subdir = src/test/regress top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -# file with extra config for temp build -TEMP_CONF = -ifdef TEMP_CONFIG -TEMP_CONF += --temp-config=$(TEMP_CONFIG) -endif - # maximum simultaneous connections for parallel tests MAXCONNOPT = ifdef MAX_CONNECTIONS --------------010301030109070801020201 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --------------010301030109070801020201--