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: "PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Cc: "Andres Freund" <andres@anarazel.de>, "Nazir Bilal Yavuz" <byavuz81@gmail.com>
Date: 2026-01-26T10:13:57Z
Lists: pgsql-hackers

Attachments

I've gotten totally fed up with the amount of clicking I need to do
every time a test fails in CI to find out what exactly failed. The
output that meson gives in its main output is completely useless
currently. Which means I have to go click through CirrusCI its (pretty
terrible) filebrowser UI searching for log files or regression.diffs.

And locally I have the exact same problem when a perl test is failing.
Meson often shows no useful output at all, which means I have to find
some unknown log file somewhere in my build directory. And then I have
to find the useful spot in that log file that actually tells me what the
error was.

So attached are a few small patches that greatly improve the test output
of the most common test failure reasons (at least the ones I tend to run
into myself).

An example CI run with some intentional failures (attached as the
nocfbot patch) can be found here:
https://cirrus-ci.com/task/6592551433535488

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