Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8b5cd37

Browse files
committed
Remove most msys special processing in TAP tests
Following migration of Windows buildfarm members running TAP tests touse of ucrt64 perl for those tests, special processing for msys perl isno longer necessary and so is removed.Backpatch to release 10Discussion:https://postgr.es/m/c65a8781-77ac-ea95-d185-6db291e1baeb@dunslane.net
1 parent652ff98 commit8b5cd37

File tree

6 files changed

+2
-41
lines changed

6 files changed

+2
-41
lines changed

‎src/bin/pg_ctl/t/001_start_stop.pl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,7 @@
4646
'pg_ctl','start','-D',"$tempdir/data",'-l',
4747
"$TestLib::log_path/001_start_stop_server.log"
4848
];
49-
if ($Config{osname}ne'msys')
50-
{
51-
command_like($ctlcmd,qr/done.*server started/s,'pg_ctl start');
52-
}
53-
else
54-
{
55-
56-
# use the version of command_like that doesn't hang on Msys here
57-
command_like_safe($ctlcmd,qr/done.*server started/s,'pg_ctl start');
58-
}
49+
command_like($ctlcmd,qr/done.*server started/s,'pg_ctl start');
5950

6051
# sleep here is because Windows builds can't check postmaster.pid exactly,
6152
# so they may mistake a pre-existing postmaster.pid for one created by the

‎src/bin/pg_rewind/t/RewindTest.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ sub check_query
115115
}
116116
else
117117
{
118-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
119118
is($stdout,$expected_stdout,"$test_name: query result matches");
120119
}
121120
return;

‎src/test/perl/PostgresNode.pm

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -846,9 +846,7 @@ sub kill9
846846
local%ENV =$self->_get_env();
847847

848848
print"### Killing node\"$name\" using signal 9\n";
849-
# kill(9, ...) fails under msys Perl 5.8.8, so fall back on pg_ctl.
850-
kill(9,$self->{_pid})
851-
or TestLib::system_or_bail('pg_ctl','kill','KILL',$self->{_pid});
849+
kill(9,$self->{_pid});
852850
$self->{_pid} =undef;
853851
return;
854852
}
@@ -1772,19 +1770,13 @@ sub psql
17721770
}
17731771
};
17741772

1775-
# Note: on Windows, IPC::Run seems to convert \r\n to \n in program output
1776-
# if we're using native Perl, but not if we're using MSys Perl. So do it
1777-
# by hand in the latter case, here and elsewhere.
1778-
17791773
if (defined$$stdout)
17801774
{
1781-
$$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
17821775
chomp$$stdout;
17831776
}
17841777

17851778
if (defined$$stderr)
17861779
{
1787-
$$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
17881780
chomp$$stderr;
17891781
}
17901782

@@ -2261,9 +2253,7 @@ sub poll_query_until
22612253
my$result = IPC::Run::run$cmd,'<', \$query,
22622254
'>', \$stdout,'2>', \$stderr;
22632255

2264-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
22652256
chomp($stdout);
2266-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
22672257
chomp($stderr);
22682258

22692259
if ($stdouteq$expected &&$stderreq'')
@@ -2717,9 +2707,6 @@ sub pg_recvlogical_upto
27172707
}
27182708
};
27192709

2720-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
2721-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
2722-
27232710
if (wantarray)
27242711
{
27252712
return ($ret,$stdout,$stderr,$timeout);

‎src/test/perl/TestLib.pm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ sub run_command
382382
my ($cmd) =@_;
383383
my ($stdout,$stderr);
384384
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
385-
foreach ($stderr,$stdout) {s/\r\n/\n/gif$Config{osname}eq'msys'; }
386385
chomp($stdout);
387386
chomp($stderr);
388387
return ($stdout,$stderr);
@@ -467,7 +466,6 @@ sub slurp_file
467466
$contents = <$fh>;
468467
close$fh;
469468

470-
$contents =~s/\r\n/\n/gif$Config{osname}eq'msys';
471469
return$contents;
472470
}
473471

@@ -825,7 +823,6 @@ sub command_like
825823
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
826824
ok($result,"$test_name: exit code 0");
827825
is($stderr,'',"$test_name: no stderr");
828-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
829826
like($stdout,$expected_stdout,"$test_name: matches");
830827
return;
831828
}
@@ -878,7 +875,6 @@ sub command_fails_like
878875
print("# Running:" .join("", @{$cmd}) ."\n");
879876
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
880877
ok(!$result,"$test_name: exit code not 0");
881-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
882878
like($stderr,$expected_stderr,"$test_name: matches");
883879
return;
884880
}
@@ -923,8 +919,6 @@ sub command_checks_all
923919
if$ret & 127;
924920
$ret =$ret >> 8;
925921

926-
foreach ($stderr,$stdout) {s/\r\n/\n/gif$Config{osname}eq'msys'; }
927-
928922
# check status
929923
ok($ret ==$expected_ret,
930924
"$test_name status (got$ret vs expected$expected_ret)");

‎src/test/recovery/t/021_row_visibility.pl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,6 @@ sub send_query_and_wait
187187
$$psql{run}->pump_nb();
188188
while (1)
189189
{
190-
# See PostgresNode.pm's psql()
191-
$$psql{stdout} =~s/\r\n/\n/gif$Config{osname}eq'msys';
192-
193190
lastif$$psql{stdout} =~/$untl/;
194191

195192
if ($psql_timeout->is_expired)

‎src/test/recovery/t/cp_history_files

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@ use warnings;
77
die"wrong number of arguments"if@ARGV != 2;
88
my ($source,$target) =@ARGV;
99
exitif$source !~/history/;
10-
if ($^Oeq'msys')
11-
{
12-
# make a windows path look like an msys path if necessary
13-
$source =~s!^([A-Za-z]):!'/' . lc($1)!e;
14-
$source =~s!\\!/!g;
15-
}
16-
1710
copy($source,$target)ordie"couldn't copy$source to$target:$!";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp