mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
Commit b3b4d8e68a
moved our perl test modules to a better namespace
structure, but this has made life hard for people wishing to backpatch
improvements in the TAP tests. Here we alleviate much of that difficulty
by implementing the new module names on top of the old modules, mostly
by using a little perl typeglob aliasing magic, so that we don't have a
dual maintenance burden. This should work both for the case where a new
test is backpatched and the case where a fix to an existing test that
uses the new namespace is backpatched.
Reviewed by Michael Paquier
Per complaint from Andres Freund
Discussion: https://postgr.es/m/20220418141530.nfxtkohefvwnzncl@alap3.anarazel.de
Applied to branches 10 through 14
44 lines
764 B
Perl
44 lines
764 B
Perl
# Copyright (c) 2022, PostgreSQL Global Development Group
|
|
|
|
# allow use of release 15+ perl namespace in older branches
|
|
# just 'use' the older module name.
|
|
# We export the same names as the v15 module.
|
|
# See TestLib.pm for alias assignment that makes this all work.
|
|
|
|
package PostgreSQL::Test::Utils;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Exporter 'import';
|
|
|
|
use TestLib;
|
|
|
|
our @EXPORT = qw(
|
|
generate_ascii_string
|
|
slurp_dir
|
|
slurp_file
|
|
append_to_file
|
|
check_mode_recursive
|
|
chmod_recursive
|
|
check_pg_config
|
|
system_or_bail
|
|
system_log
|
|
run_log
|
|
|
|
command_ok
|
|
command_fails
|
|
command_exit_is
|
|
program_help_ok
|
|
program_version_ok
|
|
program_options_handling_ok
|
|
command_like
|
|
command_like_safe
|
|
command_fails_like
|
|
command_checks_all
|
|
|
|
$windows_os
|
|
);
|
|
|
|
1;
|