Skip to content

Commit 3bba0f9

Browse files
committed
Adjust kerberos and ldap tests for Homebrew on ARM
The Homebrew package manager changed its default installation prefix for the new architecture, so a couple of tests need tweaks to find binaries. This is a partial backpatch of dc513bc.
1 parent 74ad9b0 commit 3bba0f9

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/test/kerberos/t/001_auth.pl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@
2828

2929
my ($krb5_bin_dir, $krb5_sbin_dir);
3030

31-
if ($^O eq 'darwin')
31+
if ($^O eq 'darwin' && -d "/opt/homebrew" )
3232
{
33+
# typical paths for Homebrew on ARM
34+
$krb5_bin_dir = '/opt/homebrew/opt/krb5/bin';
35+
$krb5_sbin_dir = '/opt/homebrew/opt/krb5/sbin';
36+
}
37+
elsif ($^O eq 'darwin')
38+
{
39+
# typical paths for Homebrew on Intel
3340
$krb5_bin_dir = '/usr/local/opt/krb5/bin';
3441
$krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
3542
}

src/test/ldap/t/001_auth.pl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@
1717

1818
$ldap_bin_dir = undef; # usually in PATH
1919

20-
if ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
20+
if ($^O eq 'darwin' && -d '/opt/homebrew/opt/openldap')
2121
{
22-
# typical paths for Homebrew
22+
# typical paths for Homebrew on ARM
23+
$slapd = '/opt/homebrew/opt/openldap/libexec/slapd';
24+
$ldap_schema_dir = '/opt/homebrew/etc/openldap/schema';
25+
}
26+
elsif ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
27+
{
28+
# typical paths for Homebrew on Intel
2329
$slapd = '/usr/local/opt/openldap/libexec/slapd';
2430
$ldap_schema_dir = '/usr/local/etc/openldap/schema';
2531
}

0 commit comments

Comments
 (0)