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';
$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 = '';