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

Jelte Fennema <postgres@jeltef.nl>

From: "Jelte Fennema-Nio" <postgres@jeltef.nl>
To: "Zsolt Parragi" <zsolt.parragi@percona.com>
Cc: "Nazir Bilal Yavuz" <byavuz81@gmail.com>, "Andres Freund" <andres@anarazel.de>, "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>, <andrew@dunslane.net>
Date: 2026-03-17T10:23:26Z
Lists: pgsql-hackers

Attachments

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.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use command_ok for pg_regress calls in 002_pg_upgrade and 027_stream_regress

  2. perl tap: Show die reason in TAP output

  3. perl tap: Show failed command output

  4. perl tap: Use croak instead of die in our helper modules

  5. pg_regress: Include diffs in TAP output