perl tap: Use croak instead of die in our helper modules
Andrew Dunstan <andrew@dunslane.net>
perl tap: Use croak instead of die in our helper modules Replace die with croak throughout Cluster.pm and Utils.pm (except in INIT blocks and signal handlers, where die is correct) so that error messages report the test script's line number rather than the helper module's. Add @CARP_NOT in Utils.pm listing PostgreSQL::Test::Cluster, so that when a Utils function is called through a Cluster.pm wrapper, croak skips both packages and reports the actual test-script caller. Author: Jelte Fennema-Nio <postgres@jeltef.nl> Reviewed-by: Andrew Dunstan <andrew@dunslane.net> Reviewed-by: Corey Huinker <corey.huinker@gmail.com> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/DFYFWM053WHS.10K8ZPJ605UFK@jeltef.nl
Files
| Path | Change | +/− |
|---|---|---|
| src/test/perl/PostgreSQL/Test/Cluster.pm | modified | +54 −54 |
| src/test/perl/PostgreSQL/Test/Utils.pm | modified | +17 −13 |
Discussion
- meson: Make test output much more useful on failure (both in CI and locally) 25 messages · 2026-01-26 → 2026-05-26