From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor TAP test code for file comparisons into new routine in
Date: Sun, 09 Feb 2025 07:52:58 +0000
Message-ID: <E1th27d-006ASu-PO@gemulon.postgresql.org> (raw)
Refactor TAP test code for file comparisons into new routine in Utils.pm
This unifies the output used should any differences be found in the
files provided, information that 027_stream_regress did not show on
failures. TAP tests of pg_combinebackup and pg_upgrade now rely on the
refactored routine, reducing the dependency to the diff command. The
callers of this routine can optionally specify a custom line-comparison
function.
There are a couple of tests that still use directly a diff command:
001_pg_bsd_indent, 017_shm and test_json_parser's 003. These rely on
different properties and are left out for now.
Extracted from a larger patch by the same author.
Author: Ashutosh Bapat
Discussion: https://postgr.es/m/Z6RQS-tMzGYjlA-H@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/169208092f5c98a6021b23b38f03a5d65f84ad96
Modified Files
--------------
src/bin/pg_combinebackup/t/002_compare_backups.pl | 19 ++---------
src/bin/pg_upgrade/t/002_pg_upgrade.pl | 22 +++---------
src/test/perl/PostgreSQL/Test/Utils.pm | 41 +++++++++++++++++++++++
src/test/recovery/t/027_stream_regress.pl | 14 ++++----
4 files changed, 53 insertions(+), 43 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor TAP test code for file comparisons into new routine in
In-Reply-To: <E1th27d-006ASu-PO@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox