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 1ileAY-0003DZ-2c for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2019 19:24:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ile9X-0003QV-AZ for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2019 19:23:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ile9W-0003QO-Pz for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2019 19:23:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ile9T-0001cr-Le for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2019 19:23:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBTJMunH009762; Sun, 29 Dec 2019 14:22:56 -0500 From: Tom Lane To: Fabien COELHO cc: PostgreSQL Developers Subject: Re: TAP testing for psql's tab completion code In-reply-to: References: <10967.1577562752@sss.pgh.pa.us> <7904.1577573534@sss.pgh.pa.us> <28327.1577639622@sss.pgh.pa.us> <30270.1577641991@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Sun, 29 Dec 2019 19:52:41 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <9760.1577647376.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Sun, 29 Dec 2019 14:22:56 -0500 Message-ID: <9761.1577647376@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: >> No, I disagree with that. If configure thinks it built with readline, >> and then the actual binary acts like it doesn't have readline, that's >> a bug that we'd like the tests to detect. > Hmmm. Sure, that's a point. > What about running some tests on an installed version? I think "make installcheck" has plenty of dependencies already on the build tree matching the installed version. For instance, src/pl will/won't run regression tests on languages it thinks was/weren't built. If you want to run such tests retroactively, you'd better make sure you configure your build tree to match the existing installation. >> I mainly just duplicated the environment set up by PostgresNode::psql >> as much as it seemed reasonable to. The -At options are kind of >> irrelevant for what we're going to test here, probably, but why not >> keep the default behavior the same? I did drop -q since that >> suppresses prompting, and we probably want to test prompt.c using >> this infrastructure. > That is what my patch does: it tests prompts, tab completion, help, > command options… and I added tests till I covered most psql source. Well, I think that where possible we ought to test using the existing test infrastructure -- help, for example, seems like it could perfectly well be tested in src/test/regress/sql/psql.sql, or we could move stuff out to a new set of SQL test scripts under src/bin/psql/sql/, if it seems like we don't need it to be part of the core tests. But any tests using this new infrastructure are going to be skipped by some percentage of test machines, so we shouldn't skip what needn't be skipped. regards, tom lane