pgsql: Add more $Test::Builder::Level in the TAP tests

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add more $Test::Builder::Level in the TAP tests
Date: 2021-10-12 02:17:05
Message-ID: E1ma7Ll-0006iA-4d@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d5ab331a339d1a5f484e514e8cd231c291261dec

Modified Files
--------------
src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl | 2 ++
src/test/kerberos/t/001_auth.pl | 2 ++
src/test/perl/README | 10 +++++++++-
src/test/recovery/t/001_stream_rep.pl | 2 ++
src/test/recovery/t/003_recovery_targets.pl | 2 ++
src/test/recovery/t/007_sync_rep.pl | 2 ++
src/test/recovery/t/009_twophase.pl | 2 ++
7 files changed, 21 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2021-10-12 08:11:47 pgsql: psql: More tests
Previous Message Fujii Masao 2021-10-12 00:51:49 pgsql: Make autovacuum launcher more responsive to pg_log_backend_memor