1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +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:47:56 -05:00
parent 95d981338b
commit 1c6d462939
6 changed files with 2 additions and 41 deletions

View File

@ -401,7 +401,6 @@ sub run_command
my ($cmd) = @_;
my ($stdout, $stderr);
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; }
chomp($stdout);
chomp($stderr);
return ($stdout, $stderr);
@ -486,7 +485,6 @@ sub slurp_file
$contents = <$fh>;
close $fh;
$contents =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
return $contents;
}
@ -844,7 +842,6 @@ sub command_like
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok($result, "$test_name: exit code 0");
is($stderr, '', "$test_name: no stderr");
$stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stdout, $expected_stdout, "$test_name: matches");
return;
}
@ -897,7 +894,6 @@ sub command_fails_like
print("# Running: " . join(" ", @{$cmd}) . "\n");
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
ok(!$result, "$test_name: exit code not 0");
$stderr =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
like($stderr, $expected_stderr, "$test_name: matches");
return;
}
@ -942,8 +938,6 @@ sub command_checks_all
if $ret & 127;
$ret = $ret >> 8;
foreach ($stderr, $stdout) { s/\r\n/\n/g if $Config{osname} eq 'msys'; }
# check status
ok($ret == $expected_ret,
"$test_name status (got $ret vs expected $expected_ret)");