More fixes to allow pg_rewind tests to run on Msys.
This commit is contained in:
parent
6fcd88511f
commit
15c3a1b45b
@ -40,6 +40,7 @@ use warnings;
|
|||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
|
|
||||||
|
use Config;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
use File::Path qw(rmtree);
|
use File::Path qw(rmtree);
|
||||||
use IPC::Run qw(run start);
|
use IPC::Run qw(run start);
|
||||||
@ -119,6 +120,7 @@ sub check_query
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$stdout =~ s/\r//g if $Config{osname} eq 'msys';
|
||||||
is($stdout, $expected_stdout, "$test_name: query result matches");
|
is($stdout, $expected_stdout, "$test_name: query result matches");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,6 +140,7 @@ sub poll_query_until
|
|||||||
my $result = run $cmd, '>', \$stdout, '2>', \$stderr;
|
my $result = run $cmd, '>', \$stdout, '2>', \$stderr;
|
||||||
|
|
||||||
chomp($stdout);
|
chomp($stdout);
|
||||||
|
$stdout =~ s/\r//g if $Config{osname} eq 'msys';
|
||||||
if ($stdout eq "t")
|
if ($stdout eq "t")
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
use File::Path qw(remove_tree);
|
use File::Path qw(rmtree);
|
||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
if ($windows_os)
|
if ($windows_os)
|
||||||
@ -25,7 +25,7 @@ sub run_test
|
|||||||
|
|
||||||
my $master_xlogdir = "$tmp_check/xlog_master";
|
my $master_xlogdir = "$tmp_check/xlog_master";
|
||||||
|
|
||||||
remove_tree($master_xlogdir);
|
rmtree($master_xlogdir);
|
||||||
RewindTest::setup_cluster();
|
RewindTest::setup_cluster();
|
||||||
|
|
||||||
# turn pg_xlog into a symlink
|
# turn pg_xlog into a symlink
|
||||||
|
Loading…
x
Reference in New Issue
Block a user