pgsql: Adjust new TAP test to work on macOS.

Started by Tom Lane9 months ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Adjust new TAP test to work on macOS.

Seems Apple's version of "wc -l" puts spaces before the number.
(I wonder why the cfbot didn't find this.) While here, make
the failure case log what it got, to aid debugging future issues.

Per buildfarm.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/afd532c3a80c12a9c0f836c5e4fc3cfe6503b91f

Modified Files
--------------
src/bin/psql/t/030_pager.pl | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

#2Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#1)
Re: pgsql: Adjust new TAP test to work on macOS.

On 2025-10-07 15:47:58 +0000, Tom Lane wrote:

Adjust new TAP test to work on macOS.

Seems Apple's version of "wc -l" puts spaces before the number.
(I wonder why the cfbot didn't find this.)

[15:04:43.968] 222/352 postgresql:psql / psql/030_pager SKIP 0.11s

I guess we need IO::Pty on macos. But, oddly enouugh, we are installing
p5.34-io-tty, which I thought was the right package. Not sure what's going on.

Greetings,

Andres

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#2)
Re: pgsql: Adjust new TAP test to work on macOS.

Andres Freund <andres@anarazel.de> writes:

On 2025-10-07 15:47:58 +0000, Tom Lane wrote:

(I wonder why the cfbot didn't find this.)

I guess we need IO::Pty on macos. But, oddly enouugh, we are installing
p5.34-io-tty, which I thought was the right package. Not sure what's going on.

Nah, I realized what'd happened immediately after pushing:
the cfbot's run just silently skipped that test because the
probe of what "wc -l" produces didn't match what it expected.

regards, tom lane