Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fxIP8-0003hZ-J0 for pgsql-committers@arkaria.postgresql.org; Tue, 04 Sep 2018 20:58:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fxIP5-0000Ss-Lt for pgsql-committers@arkaria.postgresql.org; Tue, 04 Sep 2018 20:58:27 +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.89) (envelope-from ) id 1fxIP5-0000Sl-3s for pgsql-committers@lists.postgresql.org; Tue, 04 Sep 2018 20:58:27 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fxIP1-0006V6-PT for pgsql-committers@lists.postgresql.org; Tue, 04 Sep 2018 20:58:25 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 214B321C5F; Tue, 4 Sep 2018 16:58:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 04 Sep 2018 16:58:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=aHywxb7J4KW2OzH9txIDvHLXhN9bPdzsWFco8uPWi+M=; b=VmJvCirI MR6umev749aDk0CtSLoO5z7nS3NZGewHGzrFgBsmiFQzmZ5ULC05eEakS4k29bQa wjLY6tJyOlCklOrYz4cAnuBeM3ju+wP/Lv65wyXkXCNqdkCN1JKGExL+eDbwFtD9 XzXG+lsceQIVcoqL/kmNcJ3zCOvHSJYYFbRc6e5bJySyK3VNl1piizGQF1HnaOzT E3QUKTIjIcTwA1Bek/kXq1x9BQOk06YBa29V6zdWg+W6jBaZ1rVzC7bH6b1Y+EbV QF89HubpitIRMrLOS9I1ktQbq78l7qekpIW9slwsm4lYYHe1FV8NUBGJ16BLAVeo c6nIIN8BIJOFQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=aHywxb7J4KW2OzH9txIDvHLXhN9bP dzsWFco8uPWi+M=; b=LDp9xAM8B+xON4zpHJEnNbiXBik5jrvqhqBQycyaNOQxV PMazsCf/lf4NevK5e8BnOL23Ui12r13hhryIyivfgUoHZRk+LcZpIpxR87j1rSij VqkZS+6OyOekCwKcC8/YcMMiPNax5zLwNquq+AM6mmCz+c9B4rZtMHv+EZ16Gqi9 g9ouC1GgUkH+DN9qnZRYt0kg5CKPinAIi/4q+AYZBqOmWT9ZjxLe9ZKrSqpZ3K27 ZJReP6O7Fs1zS4jBd7VMZREjLLgZbeu/LXYuqFgL5PNku4pESfZh9ZxgCt17IpB0 HRTv5sj6L8l3VBNLfemzvpmJHugSXAliduykFKY+A== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (unknown [208.91.3.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 88A9FE414A; Tue, 4 Sep 2018 16:58:21 -0400 (EDT) Date: Tue, 4 Sep 2018 13:58:18 -0700 From: Michael Paquier To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Clean up after TAP tests in oid2name and vacuumlo. Message-ID: <20180904205818.GH20696@paquier.xyz> References: <20180904172957.GC20696@paquier.xyz> <23385.1536082913@sss.pgh.pa.us> <20180904190321.GF20696@paquier.xyz> <28056.1536088615@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="I/5syFLg1Ed7r+1G" Content-Disposition: inline In-Reply-To: <28056.1536088615@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --I/5syFLg1Ed7r+1G Content-Type: multipart/mixed; boundary="uJWb33pM2TcUAXIl" Content-Disposition: inline --uJWb33pM2TcUAXIl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 04, 2018 at 03:16:55PM -0400, Tom Lane wrote: > Why would we invent a different target name? I was thinking something > roughly like >=20 > check: submake $(REGRESS_PREP) > ifdef REGRESS > $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) > endif > ifdef TAP_TESTS > $(prove_check) > endif >=20 > although getting it to print a useful response when neither symbol > is set would require complicating things a bit. Still, as long as > there's just one copy of this rule, messiness isn't a big problem. OK. I have dug into that, and finished with the attached. What do you think? One thing is that the definition of submake is moving out of REGRESS, and .PHONY gets defined. -- Michael --uJWb33pM2TcUAXIl Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="tap-pgxs.patch" Content-Transfer-Encoding: quoted-printable diff --git a/contrib/oid2name/Makefile b/contrib/oid2name/Makefile index 908e078714..361a80a7a1 100644 --- a/contrib/oid2name/Makefile +++ b/contrib/oid2name/Makefile @@ -6,11 +6,11 @@ PGAPPICON =3D win32 PROGRAM =3D oid2name OBJS =3D oid2name.o $(WIN32RES) =20 +TAP_TESTS =3D 1 + PG_CPPFLAGS =3D -I$(libpq_srcdir) PG_LIBS_INTERNAL =3D $(libpq_pgport) =20 -EXTRA_CLEAN =3D tmp_check - ifdef USE_PGXS PG_CONFIG =3D pg_config PGXS :=3D $(shell $(PG_CONFIG) --pgxs) @@ -21,9 +21,3 @@ top_builddir =3D ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif - -check: - $(prove_check) - -installcheck: - $(prove_installcheck) diff --git a/contrib/vacuumlo/Makefile b/contrib/vacuumlo/Makefile index 5de506151e..3efcb46735 100644 --- a/contrib/vacuumlo/Makefile +++ b/contrib/vacuumlo/Makefile @@ -6,11 +6,11 @@ PGAPPICON =3D win32 PROGRAM =3D vacuumlo OBJS =3D vacuumlo.o $(WIN32RES) =20 +TAP_TESTS =3D 1 + PG_CPPFLAGS =3D -I$(libpq_srcdir) PG_LIBS_INTERNAL =3D $(libpq_pgport) =20 -EXTRA_CLEAN =3D tmp_check - ifdef USE_PGXS PG_CONFIG =3D pg_config PGXS :=3D $(shell $(PG_CONFIG) --pgxs) @@ -21,9 +21,3 @@ top_builddir =3D ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif - -check: - $(prove_check) - -installcheck: - $(prove_installcheck) diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index d5731621e7..4759d09823 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -1283,6 +1283,15 @@ include $(PGXS) =20 + + TAP_TESTS + + + switch defining if TAP tests need to be run + + + + NO_INSTALLCHECK diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index 8deb356958..453b117dc5 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -44,6 +44,7 @@ # listed in MODULES or MODULE_big # REGRESS -- list of regression test cases (without suffix) # REGRESS_OPTS -- additional switches to pass to pg_regress +# TAP_TESTS -- switch to enable TAP tests # NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if # tests require special configuration, or don't use pg_regress # EXTRA_CLEAN -- extra files to remove in 'make clean' @@ -305,6 +306,9 @@ ifeq ($(PORTNAME), win) rm -f regress.def endif endif # REGRESS +ifdef TAP_TESTS + rm -rf tmp_check/ +endif =20 ifdef MODULE_big clean: clean-lib @@ -339,6 +343,7 @@ $(test_files_build): $(abs_builddir)/%: $(srcdir)/% $(MKDIR_P) $(dir $@) ln -s $< $@ endif # VPATH +endif # REGRESS =20 .PHONY: submake submake: @@ -346,21 +351,32 @@ ifndef PGXS $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X) endif =20 -# against installed postmaster +# Standard rules to run regression tests including multiple test suites. +# Runs against an installed postmaster ifndef NO_INSTALLCHECK installcheck: submake $(REGRESS_PREP) +ifdef REGRESS $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS) endif +ifdef TAP_TESTS + $(prove_installcheck) +endif +endif # NO_INSTALLCHECK =20 +# Runs independently of any installation ifdef PGXS check: @echo '"$(MAKE) check" is not supported.' @echo 'Do "$(MAKE) install", then "$(MAKE) installcheck" instead.' else check: submake $(REGRESS_PREP) +ifdef REGRESS $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) endif -endif # REGRESS +ifdef TAP_TESTS + $(prove_check) +endif +endif # PGXS =20 ifndef NO_TEMP_INSTALL temp-install: EXTRA_INSTALL+=3D$(subdir) diff --git a/src/test/modules/test_pg_dump/Makefile b/src/test/modules/test= _pg_dump/Makefile index c64b353707..6123b994f6 100644 --- a/src/test/modules/test_pg_dump/Makefile +++ b/src/test/modules/test_pg_dump/Makefile @@ -7,6 +7,7 @@ EXTENSION =3D test_pg_dump DATA =3D test_pg_dump--1.0.sql =20 REGRESS =3D test_pg_dump +TAP_TESTS =3D 1 =20 ifdef USE_PGXS PG_CONFIG =3D pg_config @@ -18,8 +19,3 @@ top_builddir =3D ../../../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif - -check: prove-check - -prove-check: | temp-install - $(prove_check) --uJWb33pM2TcUAXIl-- --I/5syFLg1Ed7r+1G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAluO8ekACgkQnvQgOdby QH2FTA/+OBfNrQ+Cvm7Njuc47wx13wEa7Qv/ivOYT9+Da3SK+jZVwnecZ1zDez+R K3nNmTTI6zGTCEKUO2KrkIHeISE3/atJMcsxTiUGyW8VQAS1kIM5L4QD5+OwW0T/ Qi2YjvxLIexmPFhHnDZwhwek8GBVe74eKG6rFdGxc30d+SHV+LCnel8gGpqshTKo 8R5M+lbHyavhW3SrrgPCJTvGpN4acrNT9yD/ZbM8Rg5/MgH7SOLOpw0lis/a1HGx dcePXouETSHu3lcOIrLBXsRdeu75nWZtxKxOpGP7nqooDtSqcaA4i0CkdTxeG6DD YLvlQAkiKtuxuNh2dO7uGMbGnlMJbhi0VUorNII6x6OaDsSXrzAAOmIopvTbOh31 YX0Wrs5WVb3lPfydZB5zu1HdmuOhcYfh6gGjmBrKtk6lSxYDrPx7XHBb9+GMLShQ gOIKqMW6AmybYspi2lAhiemV2WBjNbESdHrpu90AtmpeGCnBKjx6DEeyRcjd2qko 6y6aLTMjcWpu7KytyHUCh8Qs5coBEvPqjU8G46FbzQGFhwM4elaHAn9OsZZJ6y+W qetiS64iVuXRW66SxGSA1DL2fqLvtWpkiJI6uSejTF41xZwwI8XAhQPkMBSBc6b9 IRcdnM04/4Fe1oB2JY4ps2qFeV/sPc4OxTm4UFGC0Pun5FgNBmI= =NRvl -----END PGP SIGNATURE----- --I/5syFLg1Ed7r+1G--