# The following tests test symlinks. Windows doesn't have symlinks, so
# skip on Windows.
SKIP: {
- skip "symlinks not supported on Windows", 10 if ($Config{osname} eq "MSWin32");
+ skip "symlinks not supported on Windows", 10 if ($windows_os);
# Create a temporary directory in the system location and symlink it
# to our physical temp location. That way we can use shorter names
"$tempdir/data" ],
'configure authentication');
open CONF, ">>$tempdir/data/postgresql.conf";
-if ($Config{osname} ne "MSWin32")
+if (! $windows_os)
{
print CONF "listen_addresses = ''\n";
print CONF "unix_socket_directories = '$tempdir_short'\n";
$tmp_check
$log_path
+ $windows_os
);
use Cwd;
use Test::More;
+our $windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys';
+
# Open log file. For each test, the log file name uses the name of the
# file launching this module, without the .pl suffix.
our ($tmp_check, $log_path);
open CONF, ">>$pgdata/postgresql.conf";
print CONF "\n# Added by TestLib.pm)\n";
- if ($Config{osname} eq "MSWin32")
+ if ($windows_os)
{
print CONF "listen_addresses = '127.0.0.1'\n";
}
}
close CONF;
- $ENV{PGHOST} = ($Config{osname} eq "MSWin32") ? "127.0.0.1" : $tempdir_short;
+ $ENV{PGHOST} = $windows_os ? "127.0.0.1" : $tempdir_short;
}
# Set up the cluster to allow replication connections, in the same way that
open HBA, ">>$pgdata/pg_hba.conf";
print HBA "\n# Allow replication (set up by TestLib.pm)\n";
- if ($Config{osname} ne "MSWin32")
+ if (! $windows_os)
{
print HBA "local replication all trust\n";
}