Re: pgsql: Add basic TAP tests for psql's tab-completion logic. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date
Msg-id 14599.1578060636@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add basic TAP tests for psql's tab-completion logic.  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
Michael Paquier <michael@paquier.xyz> writes:
> 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.

I do not think that requiring IO::Pty is practical.  It's not going
to be present in Windows installations, for starters, because it's
nonfunctional there.  I've also found that it fails to compile on
some of my older buildfarm dinosaurs.

In the case of IPC::Run, having a hard dependency is sensible because
the TAP tests pretty much can't do anything at all without it.
However, we don't need IO::Pty except for testing a few psql behaviors,
so it's fine with me if some buildfarm members don't run those tests.

There's precedent, too: see for instance
src/test/recovery/t/017_shm.pl
which is where I stole this coding technique from.

            regards, tom lane



pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Next
From: Tom Lane
Date:
Subject: pgsql: Add an ugly workaround for a bug in some recent libedit versions