Re: meson: Make test output much more useful on failure (both in CI and locally)

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Zsolt Parragi" <zsolt(dot)parragi(at)percona(dot)com>
Cc: "Nazir Bilal Yavuz" <byavuz81(at)gmail(dot)com>, "Andres Freund" <andres(at)anarazel(dot)de>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, <andrew(at)dunslane(dot)net>
Subject: Re: meson: Make test output much more useful on failure (both in CI and locally)
Date: 2026-03-17 10:23:26
Message-ID: DH4ZF4BENK7C.IXW5BEFGMFHQ@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed Mar 4, 2026 at 11:56 PM CET, Zsolt Parragi wrote:
> Previously this printed a line about running the command even on
> success, and the new version removes that. Was this intentional? It's
> not mentioned in the commit message and that seems like a useful
> feature to me.

Fixed this now. I also fixed two off-by-one errors in counting the
number of outputted lines (found by local AI review).

And I also changed the logic to write to the diff file to close and
re-open, because I realized that on Windows the new logic would create
these errors when trying to write to the diffs file:

[09:00:49.251] stderr:
[09:00:49.251] The process cannot access the file because it is being used by another process.
[09:00:49.251] The process cannot access the file because it is being used by another process.
[09:00:49.251] The process cannot access the file because it is being used by another process.
[09:00:49.251] The process cannot access the file because it is being used by another process.
[09:00:49.251] # 4 of 239 tests failed.
[09:00:49.251] # The differences that caused some tests to fail can be viewed in the file "C:/cirrus/build/testrun/regress/regress/regression.diffs".
[09:00:49.251] # A copy of the test summary that you see above is saved in the file "C:/cirrus/build/testrun/regress/regress/regression.out".
[09:00:49.251]

Finally I added a new commit which starts to use command_ok in
002_pg_upgrade.pl and 027_stream_regress.pl to get the new nicer output.

Attachment Content-Type Size
v4-0001-pg_regress-Include-diffs-in-output.patch text/x-patch 6.2 KB
v4-0002-perl-tap-Show-failed-command-output.patch text/x-patch 4.2 KB
v4-0003-perl-tap-Show-die-reason-in-TAP-output.patch text/x-patch 2.3 KB
v4-0004-perl-tap-Use-croak-instead-of-die-in-our-perl-hel.patch text/x-patch 18.2 KB
v4-0005-Simplify-and-improve-output-of-002_pg_upgrade.pl-.patch text/x-patch 11.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message 2026-03-17 10:26:23 Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE
Previous Message Andrei Lepikhov 2026-03-17 10:04:25 Re: Read-only connection mode for AI workflows.