aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2022-03-09 09:31:02 -0800
committerAndres Freund <andres@anarazel.de>2022-03-09 09:31:02 -0800
commitee56c3b21629277cf7f2e6398e7dd4e40c11df3c (patch)
treeaccd7dd76a1d7e68aa4142d707860c3feb0724ad /src
parent2cfde3c2371860aa6c05f84c3fbec9c400ab6b1a (diff)
downloadpostgresql-ee56c3b21629277cf7f2e6398e7dd4e40c11df3c.tar.gz
postgresql-ee56c3b21629277cf7f2e6398e7dd4e40c11df3c.zip
ldap tests: Don't run on unsupported operating systems.
The tests currently fail on unsupported operating systems, rather than getting skipped. The ony reason this doesn't cause problems is that the tests aren't run by default. Discussion: https://postgr.es/m/721828a7-3043-6803-a85b-da63538db3cc@enterprisedb.com
Diffstat (limited to 'src')
-rw-r--r--src/test/ldap/t/001_auth.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index 094270cb5d4..2c7ce2a8aa8 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -6,17 +6,18 @@ use warnings;
use PostgreSQL::Test::Utils;
use PostgreSQL::Test::Cluster;
use Test::More;
+use Config;
-if ($ENV{with_ldap} ne 'yes')
-{
- plan skip_all => 'LDAP not supported by this build';
-}
my ($slapd, $ldap_bin_dir, $ldap_schema_dir);
$ldap_bin_dir = undef; # usually in PATH
-if ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
+if ($ENV{with_ldap} ne 'yes')
+{
+ plan skip_all => 'LDAP not supported by this build';
+}
+elsif ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
{
# typical paths for Homebrew
$slapd = '/usr/local/opt/openldap/libexec/slapd';
@@ -39,6 +40,10 @@ elsif ($^O eq 'freebsd')
$slapd = '/usr/local/libexec/slapd';
$ldap_schema_dir = '/usr/local/etc/openldap/schema';
}
+else
+{
+ plan skip_all => "ldap tests not supported on $^O or dependencies not installed";
+}
# make your own edits here
#$slapd = '';