Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1inLPM-0005uN-OH for pgsql-committers@arkaria.postgresql.org; Fri, 03 Jan 2020 11:46:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1inLPK-0002md-Ac for pgsql-committers@arkaria.postgresql.org; Fri, 03 Jan 2020 11:46:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1inLPJ-0002gT-Es for pgsql-committers@lists.postgresql.org; Fri, 03 Jan 2020 11:46:22 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1inLPF-0002hP-U2 for pgsql-committers@lists.postgresql.org; Fri, 03 Jan 2020 11:46:20 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 219A34C3; Fri, 3 Jan 2020 06:46:13 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 03 Jan 2020 06:46:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=e3l49FtAWbfAIvPQXXbIgHKQMBs Wru4+U2VNnSyBY78=; b=hz6XOmMkSZI5Oj3vzuV3YHtV2/wwtoQBHf7KI87oHV3 c23VRD+YU9kUpoM7plyEGkqDEhqegjV3Gyz9vzmjYR3T8pwJj0AUGZZlbXoIIniq 57VtEOO2bMf1N79dah4g5YleBAkbg+IuCh+rBEJyOW5vEHPQOVn90cQD3/ksIEiK 2DmCtAHzR1mrbLxOhRZKXYTo35GN84hwzocqUffj8Y/Cy5yoZ3cKZipOkHjYKh5g 4peIvRZQy7qBZrfUDKN4ps7ohaO3B8ySfWMg2SteCVnrB4a+ZHA1TFjW2Tf5xmMG 8h214hej06AEnWBsz4IMzBcjrtY6j3kF4Z6d//uFwig== 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-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=e3l49F tAWbfAIvPQXXbIgHKQMBsWru4+U2VNnSyBY78=; b=RNoJNhG07lB9vmzSMsBtwj o9CHFjmctF6nfDHOreqn3IvdkEuwqyKpa6HimJ/hT93SMqUasdPB4yCh0BOghl1u aCDL0G8wJVVRpFg5tyC4LXGMEqQkWAg2feR8yuBqBRIfr6w7t1EeblW4sZEYU2A8 Tgrpx1eRdozmIiZDT3AF8CsvT7f7ehv3c2T7w3xGqCU7FKazFKfuloC0l46UIt5x V1IlmTsXcOZDQKZoNPYMJInTB39RWfG8X5KGu2h29B5E+abL8SEocWbTbGS0N0SP Ws3ejcyuGScUmIzvru8gUZnlZbVgcLZKyXBCMxdCU8wfE1DCTxTWJDxx2ys5NSvA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdegfedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucfkphepudduuddrud dtvddrudektddrudekheenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 7E03780059; Fri, 3 Jan 2020 06:46:11 -0500 (EST) Date: Fri, 3 Jan 2020 20:46:07 +0900 From: Michael Paquier To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic. Message-ID: <20200103114607.GA14380@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 02, 2020 at 08:02:29PM +0000, Tom Lane wrote: > Add basic TAP tests for psql's tab-completion logic. >=20 > Up to now, psql's tab-complete.c has had exactly no regression test > coverage. This patch is an experimental attempt to add some. >=20 > This needs Perl's IO::Pty module, which isn't installed everywhere, > so the test script just skips all tests if that's not present. > There may be other portability gotchas too, so I await buildfarm > results with interest. Reading through the commit logs, I am not a fan of this part: +if ($ENV{with_readline} ne 'yes') +{ + plan skip_all =3D> 'readline is not supported by this build'; +} + +# If we don't have IO::Pty, forget it, because IPC::Run depends on that +# to support pty connections +eval { require IO::Pty; }; +if ($@) +{ + plan skip_all =3D> 'IO::Pty is needed to run this test'; +} This has the disadvantage to have people never actually notice if the tests are running or not because this does not generate a dependency error. Skipping things if libreadline is not around is perfectly fine IMO, but I think that we should harden things for IO::Pty by removing this skipping part, and by adding a test in configure.in's AX_PROG_PERL_MODULES. That would be also more consistent with the approach we take with other tests. -- Michael --jRHKVT23PllUwdXP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4PKX8ACgkQnvQgOdby QH1w9Q/9GiwpOee3gvqNVxz1J/GOL/65/cB3zM5kzdiLrGen2k38/ldHSae9JEmz AYfn31HlvUM3lr3++0ekMCmNZn0+C3nRw/szFZsIOejPsdPtWI+MBjW+QkGlPgHo lXbpznEE4kHiZnpDUpl5jM0GZdLaeNe8NQ+p8P0FLdg3hCV64jvOqQXf62BK+aCZ Rzb+FW/4CQI17Mkp/2bgg48UHGTYk3BS5/olwwC096jrWAS05Nlqb/IQXLbwhjYI 31pQG+cuagBPJJGO2vfWItlmKSZoqJfBceQxp/FgjtuE1qji1lz2432sVKi3h3yo b0fRlwOoFbSNBCB8u7ZqmZHr/C/mxTdgTaJ74S3LshDkuCcs19Ugorno0WBwCHWx EM+FPFVH4nBGxL2uXDMOzDzItP21uUxBESoCl82Q88NVJuIiud3eB8/WCDF3LSSz oGccipbY0J5kc323TwfbHQmAi5vuzVcpkpeXJYacadMttJNJJAdwTLlQse64CVX4 IkQYuzxaJ5YzJLkmxPQeDSv1jgEV8ulCgeUskjO/nFpo3BaZNJ4fk8795ROM9WG3 8GL4OMFdx8cJfX77MiBTl4zVBtWCzr1omlERJ/BJCb4XT6TF5xKosSaPIYzNQyO7 kl0Ts15wOjk7MLeCR4UMbCOIdfwtR85gGPgGJdebFhjS0FAfcDA= =AhiE -----END PGP SIGNATURE----- --jRHKVT23PllUwdXP--