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

Commitffb4cee

Browse files
committed
Further tighten Windows CRLF conversion in our TAP test scripts.
Buildfarm results now imply that Perl's IPC::Run does CRLF conversionfor us if we're using native Perl, but not when using MSys Perl.Restrict the conversions done by PostgresNode.pm to act only in thelatter case. (Similar conversions done in TestLib.pm and RewindTest.pmwere already handled this way.)Discussion:https://postgr.es/m/412ae8da-76bb-640f-039a-f3513499e53d@gmx.net
1 parent991c444 commitffb4cee

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,15 +1512,19 @@ sub psql
15121512
}
15131513
};
15141514

1515+
# Note: on Windows, IPC::Run seems to convert \r\n to \n in program output
1516+
# if we're using native Perl, but not if we're using MSys Perl. So do it
1517+
# by hand in the latter case, here and elsewhere.
1518+
15151519
if (defined$$stdout)
15161520
{
1517-
$$stdout =~s/\r\n/\n/gif$TestLib::windows_os;
1521+
$$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
15181522
chomp$$stdout;
15191523
}
15201524

15211525
if (defined$$stderr)
15221526
{
1523-
$$stderr =~s/\r\n/\n/gif$TestLib::windows_os;
1527+
$$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
15241528
chomp$$stderr;
15251529
}
15261530

@@ -1651,7 +1655,7 @@ sub poll_query_until
16511655
{
16521656
my$result = IPC::Run::run$cmd,'>', \$stdout,'2>', \$stderr;
16531657

1654-
$stdout =~s/\r\n/\n/gif$TestLib::windows_os;
1658+
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
16551659
chomp($stdout);
16561660

16571661
if ($stdouteq$expected)
@@ -1667,7 +1671,7 @@ sub poll_query_until
16671671

16681672
# The query result didn't change in 180 seconds. Give up. Print the
16691673
# output from the last attempt, hopefully that's useful for debugging.
1670-
$stderr =~s/\r\n/\n/gif$TestLib::windows_os;
1674+
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
16711675
chomp($stderr);
16721676
diagqq(poll_query_until timed out executing this query:
16731677
$query
@@ -2112,8 +2116,8 @@ sub pg_recvlogical_upto
21122116
}
21132117
};
21142118

2115-
$stdout =~s/\r\n/\n/gif$TestLib::windows_os;
2116-
$stderr =~s/\r\n/\n/gif$TestLib::windows_os;
2119+
$stdout =~s/\r\n/\n/gif$Config{osname}eq'msys';
2120+
$stderr =~s/\r\n/\n/gif$Config{osname}eq'msys';
21172121

21182122
if (wantarray)
21192123
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp