diff options
author | Thomas Munro <tmunro@postgresql.org> | 2019-03-26 10:39:03 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2019-03-26 11:44:18 +1300 |
commit | aa1419e63f85b23503076bb4b6413aca30b535fe (patch) | |
tree | ce4f8b3e821c8af1d190e53562dfecc4253ce90e /src/test/ldap/t/001_auth.pl | |
parent | f7111f72d2fd31979c6d473cdde56ba8e7aba26a (diff) | |
download | postgresql-aa1419e63f85b23503076bb4b6413aca30b535fe.tar.gz postgresql-aa1419e63f85b23503076bb4b6413aca30b535fe.zip |
Add MacPorts support to src/test/ldap tests.
Previously the test knew how to find an OpenLDAP installation at the
paths used by Homebrew. Add the MacPorts paths too.
Author: Thomas Munro
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/CA%2BhUKGKrjGS7sO4jc53gp3qipCtEvThtdP_%3DzoixgX5ZBq4Nbw%40mail.gmail.com
Diffstat (limited to 'src/test/ldap/t/001_auth.pl')
-rw-r--r-- | src/test/ldap/t/001_auth.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index 431ad6442c3..6c02f2530b6 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -17,11 +17,18 @@ my ($slapd, $ldap_bin_dir, $ldap_schema_dir); $ldap_bin_dir = undef; # usually in PATH -if ($^O eq 'darwin') +if ($^O eq 'darwin' && -d '/usr/local/opt/openldap') { + # typical paths for Homebrew $slapd = '/usr/local/opt/openldap/libexec/slapd'; $ldap_schema_dir = '/usr/local/etc/openldap/schema'; } +elsif ($^O eq 'darwin' && -d '/opt/local/etc/openldap') +{ + # typical paths for MacPorts + $slapd = '/opt/local/libexec/slapd'; + $ldap_schema_dir = '/opt/local/etc/openldap/schema'; +} elsif ($^O eq 'linux') { $slapd = '/usr/sbin/slapd'; |