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

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: "Andres Freund" <andres(at)anarazel(dot)de>, "Nazir Bilal Yavuz" <byavuz81(at)gmail(dot)com>
Subject: meson: Make test output much more useful on failure (both in CI and locally)
Date: 2026-01-26 10:13:57
Message-ID: DFYFWM053WHS.10K8ZPJ605UFK@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
nocfbot.v1-0005-Fail-some-tests.patch text/x-patch 3.7 KB
v1-0001-meson-Include-pg_regress-diffs-in-meson-output.patch text/x-patch 4.3 KB
v1-0002-perl-tap-Show-failed-command-output.patch text/x-patch 3.0 KB
v1-0003-perl-tap-Show-die-reason-in-TAP-output.patch text/x-patch 2.0 KB
v1-0004-perl-tap-Include-caller-in-die-messages-of-psql.patch text/x-patch 3.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-01-26 10:20:04 Re: get rid of Pointer type, mostly
Previous Message Jelte Fennema-Nio 2026-01-26 10:05:49 Re: Safer hash table initialization macro