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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date: 2020-01-03 14:10:36
Message-ID: 14599.1578060636@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-01-03 16:15:41 pgsql: Add an ugly workaround for a bug in some recent libedit versions
Previous Message Tom Lane 2020-01-03 14:03:47 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2020-01-03 14:13:53 Re: Add support for automatically updating Unicode derived files
Previous Message Tom Lane 2020-01-03 14:03:47 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.