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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: meson: Make test output much more useful on failure (both in CI and locally)
Date: 2026-03-04 22:56:09
Message-ID: CAN4CZFMOBeKh51LqxjMGSSYHWTGPXAE33e+ZWnGgFKm21LJpfw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-03-04 23:22:30 Re: pgsql: Change default value of default_toast_compression to "lz4", when
Previous Message Sami Imseih 2026-03-04 22:54:21 Re: Add starelid, attnum to pg_stats and leverage this in pg_dump