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
- nocfbot.v1-0005-Fail-some-tests.patch (text/x-patch) patch v1-0005
- v1-0001-meson-Include-pg_regress-diffs-in-meson-output.patch (text/x-patch) patch v1-0001
- v1-0002-perl-tap-Show-failed-command-output.patch (text/x-patch) patch v1-0002
- v1-0003-perl-tap-Show-die-reason-in-TAP-output.patch (text/x-patch) patch v1-0003
- v1-0004-perl-tap-Include-caller-in-die-messages-of-psql.patch (text/x-patch) patch v1-0004
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 →
-
Use command_ok for pg_regress calls in 002_pg_upgrade and 027_stream_regress
- bb6ae9707c17 19 (unreleased) landed
-
perl tap: Show die reason in TAP output
- 76540fdedf40 19 (unreleased) landed
-
perl tap: Show failed command output
- 1402b8d2fc70 19 (unreleased) landed
-
perl tap: Use croak instead of die in our helper modules
- b8da9869b850 19 (unreleased) landed
-
pg_regress: Include diffs in TAP output
- 5720ae014364 19 (unreleased) landed