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

Commitaa8d413

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 parent8358eac commitaa8d413

File tree

5 files changed

+2
-38
lines changed

5 files changed

+2
-38
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
@@ -43,16 +43,7 @@
4343
'pg_ctl','start','-D',"$tempdir/data",'-l',
4444
"$TestLib::log_path/001_start_stop_server.log"
4545
];
46-
if ($Config{osname}ne'msys')
47-
{
48-
command_like($ctlcmd,qr/done.*server started/s,'pg_ctl start');
49-
}
50-
else
51-
{
52-
53-
# use the version of command_like that doesn't hang on Msys here
54-
command_like_safe($ctlcmd,qr/done.*server started/s,'pg_ctl start');
55-
}
46+
command_like($ctlcmd,qr/done.*server started/s,'pg_ctl start');
5647

5748
# sleep here is because Windows builds can't check postmaster.pid exactly,
5849
# 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
@@ -111,7 +111,6 @@ sub check_query
111111
}
112112
else
113113
{
114-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
115114
is($stdout,$expected_stdout,"$test_name: query result matches");
116115
}
117116
return;

‎src/test/perl/PostgresNode.pm

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,7 @@ sub kill9
809809
my$name =$self->name;
810810
returnunlessdefined$self->{_pid};
811811
print"### Killing node\"$name\" using signal 9\n";
812-
# kill(9, ...) fails under msys Perl 5.8.8, so fall back on pg_ctl.
813-
kill(9,$self->{_pid})
814-
or TestLib::system_or_bail('pg_ctl','kill','KILL',$self->{_pid});
812+
kill(9,$self->{_pid});
815813
$self->{_pid} =undef;
816814
return;
817815
}
@@ -1517,19 +1515,13 @@ sub psql
15171515
}
15181516
};
15191517

1520-
# Note: on Windows, IPC::Run seems to convert \r\n to \n in program output
1521-
# if we're using native Perl, but not if we're using MSys Perl. So do it
1522-
# by hand in the latter case, here and elsewhere.
1523-
15241518
if (defined$$stdout)
15251519
{
1526-
$$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
15271520
chomp$$stdout;
15281521
}
15291522

15301523
if (defined$$stderr)
15311524
{
1532-
$$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
15331525
chomp$$stderr;
15341526
}
15351527

@@ -1770,9 +1762,7 @@ sub poll_query_until
17701762
my$result = IPC::Run::run$cmd,'<', \$query,
17711763
'>', \$stdout,'2>', \$stderr;
17721764

1773-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
17741765
chomp($stdout);
1775-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
17761766
chomp($stderr);
17771767

17781768
if ($stdouteq$expected &&$stderreq'')
@@ -2229,9 +2219,6 @@ sub pg_recvlogical_upto
22292219
}
22302220
};
22312221

2232-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
2233-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
2234-
22352222
if (wantarray)
22362223
{
22372224
return ($ret,$stdout,$stderr,$timeout);

‎src/test/perl/TestLib.pm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ sub run_command
242242
my ($cmd) =@_;
243243
my ($stdout,$stderr);
244244
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
245-
foreach ($stderr,$stdout) {s/\r\n/\n/gif$Config{osname}eq'msys'; }
246245
chomp($stdout);
247246
chomp($stderr);
248247
return ($stdout,$stderr);
@@ -303,7 +302,6 @@ sub slurp_file
303302
$contents = <$fh>;
304303
close$fh;
305304

306-
$contents =~s/\r\n/\n/gif$Config{osname}eq'msys';
307305
return$contents;
308306
}
309307

@@ -539,7 +537,6 @@ sub command_like
539537
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
540538
ok($result,"$test_name: exit code 0");
541539
is($stderr,'',"$test_name: no stderr");
542-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
543540
like($stdout,$expected_stdout,"$test_name: matches");
544541
return;
545542
}
@@ -573,7 +570,6 @@ sub command_fails_like
573570
print("# Running:" .join("", @{$cmd}) ."\n");
574571
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
575572
ok(!$result,"$test_name: exit code not 0");
576-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
577573
like($stderr,$expected_stderr,"$test_name: matches");
578574
return;
579575
}
@@ -602,8 +598,6 @@ sub command_checks_all
602598
if$ret & 127;
603599
$ret =$ret >> 8;
604600

605-
foreach ($stderr,$stdout) {s/\r\n/\n/gif$Config{osname}eq'msys'; }
606-
607601
# check status
608602
ok($ret ==$expected_ret,
609603
"$test_name status (got$ret vs expected$expected_ret)");

‎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