Re: meson: Make test output much more useful on failure (both in CI and locally)
Zsolt Parragi <zsolt.parragi@percona.com>
From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: Nazir Bilal Yavuz <byavuz81@gmail.com>,
Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-04T22:56:09Z
Lists: pgsql-hackers
- my $result = run_log($cmd);
- ok($result, $test_name);
+ my ($stdout, $stderr);
+ my $result = IPC::Run::run $cmd, '>' => \$stdout, '2>' => \$stderr;
+ ok($result, $test_name) or do
+ {
+ diag("---------- command failed ----------");
+ _diag_command_output($cmd, $stdout, $stderr);
+ };
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.
For example:
Before:
grep "# Run" build/testrun/initdb/001_initdb/log/regress_log_001_initdb | wc -l
35
After:
grep "# Run" build/testrun/initdb/001_initdb/log/regress_log_001_initdb | wc -l
11
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