Add more $Test::Builder::Level in the TAP tests
authorMichael Paquier <michael@paquier.xyz>
Tue, 12 Oct 2021 02:15:44 +0000 (11:15 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 12 Oct 2021 02:15:44 +0000 (11:15 +0900)
commitf9c4cb686800d46ef9e9e90ed5133493b23962af
treec6a12871d50f9d098d5b203bfbe4fb308812d6e2
parente3e29cec10d15bbcedc6b41887d8f4e138d719bd
Add more $Test::Builder::Level in the TAP tests

Incrementing the level of the call stack reported is useful for
debugging purposes as it allows to control which part of the test is
exactly failing, especially if a test is structured with subroutines
that call routines from Test::More.

This adds more incrementations of $Test::Builder::Level where debugging
gets improved (for example it does not make sense for some paths like
pg_rewind where long subroutines are used).

A note is added to src/test/perl/README about that, based on a
suggestion from Andrew Dunstan and a wording coming from both of us.

Usage of Test::Builder::Level has spread in 12, so a backpatch down to
this version is done.

Reviewed-by: Andrew Dunstan, Peter Eisentraut, Daniel Gustafsson
Discussion: https://postgr.es/m/YV1CCFwgM1RV1LeS@paquier.xyz
Backpatch-through: 12
13 files changed:
contrib/amcheck/t/001_verify_heapam.pl
contrib/test_decoding/t/001_repl_stats.pl
src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl
src/bin/pg_ctl/t/004_logrotate.pl
src/bin/pg_verifybackup/t/005_bad_manifest.pl
src/bin/psql/t/010_tab_completion.pl
src/test/kerberos/t/001_auth.pl
src/test/perl/README
src/test/recovery/t/001_stream_rep.pl
src/test/recovery/t/003_recovery_targets.pl
src/test/recovery/t/007_sync_rep.pl
src/test/recovery/t/009_twophase.pl
src/test/recovery/t/018_wal_optimize.pl