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

Commita5716ba

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 parentc27aa21 commita5716ba

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
@@ -112,7 +112,6 @@ sub check_query
112112
}
113113
else
114114
{
115-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
116115
is($stdout,$expected_stdout,"$test_name: query result matches");
117116
}
118117
return;

‎src/test/perl/PostgresNode.pm

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,7 @@ sub kill9
814814
my$name =$self->name;
815815
returnunlessdefined$self->{_pid};
816816
print"### Killing node\"$name\" using signal 9\n";
817-
# kill(9, ...) fails under msys Perl 5.8.8, so fall back on pg_ctl.
818-
kill(9,$self->{_pid})
819-
or TestLib::system_or_bail('pg_ctl','kill','KILL',$self->{_pid});
817+
kill(9,$self->{_pid});
820818
$self->{_pid} =undef;
821819
return;
822820
}
@@ -1558,19 +1556,13 @@ sub psql
15581556
}
15591557
};
15601558

1561-
# Note: on Windows, IPC::Run seems to convert \r\n to \n in program output
1562-
# if we're using native Perl, but not if we're using MSys Perl. So do it
1563-
# by hand in the latter case, here and elsewhere.
1564-
15651559
if (defined$$stdout)
15661560
{
1567-
$$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
15681561
chomp$$stdout;
15691562
}
15701563

15711564
if (defined$$stderr)
15721565
{
1573-
$$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
15741566
chomp$$stderr;
15751567
}
15761568

@@ -1878,9 +1870,7 @@ sub poll_query_until
18781870
my$result = IPC::Run::run$cmd,'<', \$query,
18791871
'>', \$stdout,'2>', \$stderr;
18801872

1881-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
18821873
chomp($stdout);
1883-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
18841874
chomp($stderr);
18851875

18861876
if ($stdouteq$expected &&$stderreq'')
@@ -2337,9 +2327,6 @@ sub pg_recvlogical_upto
23372327
}
23382328
};
23392329

2340-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
2341-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
2342-
23432330
if (wantarray)
23442331
{
23452332
return ($ret,$stdout,$stderr,$timeout);

‎src/test/perl/TestLib.pm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ sub run_command
365365
my ($cmd) =@_;
366366
my ($stdout,$stderr);
367367
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
368-
foreach ($stderr,$stdout) {s/\r\n/\n/gif$Config{osname}eq'msys'; }
369368
chomp($stdout);
370369
chomp($stderr);
371370
return ($stdout,$stderr);
@@ -450,7 +449,6 @@ sub slurp_file
450449
$contents = <$fh>;
451450
close$fh;
452451

453-
$contents =~s/\r\n/\n/gif$Config{osname}eq'msys';
454452
return$contents;
455453
}
456454

@@ -776,7 +774,6 @@ sub command_like
776774
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
777775
ok($result,"$test_name: exit code 0");
778776
is($stderr,'',"$test_name: no stderr");
779-
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
780777
like($stdout,$expected_stdout,"$test_name: matches");
781778
return;
782779
}
@@ -829,7 +826,6 @@ sub command_fails_like
829826
print("# Running:" .join("", @{$cmd}) ."\n");
830827
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
831828
ok(!$result,"$test_name: exit code not 0");
832-
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
833829
like($stderr,$expected_stderr,"$test_name: matches");
834830
return;
835831
}
@@ -874,8 +870,6 @@ sub command_checks_all
874870
if$ret & 127;
875871
$ret =$ret >> 8;
876872

877-
foreach ($stderr,$stdout) {s/\r\n/\n/gif$Config{osname}eq'msys'; }
878-
879873
# check status
880874
ok($ret ==$expected_ret,
881875
"$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