1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Remove most msys special processing in TAP tests

Following migration of Windows buildfarm members running TAP tests to
use of ucrt64 perl for those tests, special processing for msys perl is
no longer necessary and so is removed.

Backpatch to release 10

Discussion: https://postgr.es/m/c65a8781-77ac-ea95-d185-6db291e1baeb@dunslane.net
This commit is contained in:
Andrew Dunstan
2022-02-20 11:50:54 -05:00
parent b4a6ceed52
commit f1f82301d6
5 changed files with 2 additions and 37 deletions

View File

@ -805,9 +805,7 @@ sub kill9
my $name = $self->name;
return unless defined $self->{_pid};
print "### Killing node \"$name\" using signal 9\n";
# kill(9, ...) fails under msys Perl 5.8.8, so fall back on pg_ctl.
kill(9, $self->{_pid})
or TestLib::system_or_bail('pg_ctl', 'kill', 'KILL', $self->{_pid});
kill(9, $self->{_pid});
$self->{_pid} = undef;
return;
}
@ -1468,19 +1466,13 @@ sub psql
}
};
# Note: on Windows, IPC::Run seems to convert \r\n to \n in program output
# if we're using native Perl, but not if we're using MSys Perl. So do it
# by hand in the latter case, here and elsewhere.
if (defined $$stdout)
{
$$stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
chomp $$stdout;
}
if (defined $$stderr)
{
$$stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
chomp $$stderr;
}
@ -1770,9 +1762,7 @@ sub poll_query_until
my $result = IPC::Run::run $cmd, '<', \$query,
'>', \$stdout, '2>', \$stderr;
$stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
chomp($stdout);
$stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
chomp($stderr);
if ($stdout eq $expected && $stderr eq '')
@ -2219,9 +2209,6 @@ sub pg_recvlogical_upto
}
};
$stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
$stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
if (wantarray)
{
return ($ret, $stdout, $stderr, $timeout);