mirror of https://github.com/postgres/postgres
Remove the need to edit back-branch-specific code sites when back-patching the addition of a PostgreSQL::Test::Utils symbol. Replace per-symbol, incomplete alias lists. Give old and new package names the same EXPORT and EXPORT_OK semantics. Back-patch to v10 (all supported versions). Reviewed by Andrew Dunstan. Discussion: https://postgr.es/m/20220622072144.GD4167527@rfd.leadboat.compull/90/head
parent
3238b5c330
commit
20911775de
@ -1,48 +1,16 @@ |
|||||||
# Copyright (c) 2022, PostgreSQL Global Development Group |
# Copyright (c) 2022, PostgreSQL Global Development Group |
||||||
|
|
||||||
# allow use of release 15+ perl namespace in older branches |
# Allow use of release 15+ Perl package name in older branches, by giving that |
||||||
# just 'use' the older module name. |
# package the same symbol table as the older package. |
||||||
# We export the same names as the v15 module. |
|
||||||
# See TestLib.pm for alias assignment that makes this all work. |
|
||||||
|
|
||||||
package PostgreSQL::Test::Utils; |
package PostgreSQL::Test::Utils; |
||||||
|
|
||||||
use strict; |
use strict; |
||||||
use warnings; |
use warnings; |
||||||
|
|
||||||
use Exporter 'import'; |
|
||||||
|
|
||||||
use TestLib; |
use TestLib; |
||||||
|
BEGIN { *PostgreSQL::Test::Utils:: = \*TestLib::; } |
||||||
|
|
||||||
our @EXPORT = qw( |
use Exporter 'import'; |
||||||
generate_ascii_string |
|
||||||
slurp_dir |
|
||||||
slurp_file |
|
||||||
append_to_file |
|
||||||
check_mode_recursive |
|
||||||
chmod_recursive |
|
||||||
check_pg_config |
|
||||||
dir_symlink |
|
||||||
system_or_bail |
|
||||||
system_log |
|
||||||
run_log |
|
||||||
run_command |
|
||||||
pump_until |
|
||||||
|
|
||||||
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 |
|
||||||
$is_msys2 |
|
||||||
$use_unix_sockets |
|
||||||
); |
|
||||||
|
|
||||||
1; |
1; |
||||||
|
|||||||
Loading…
Reference in new issue