8000 Adjust kerberos and ldap tests for Homebrew on ARM · postgres/postgres@c2cff44 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit c2cff44

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 1605623 commit c2cff44

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
@@ -15,8 +15,15 @@
1515

1616
my ($krb5_bin_dir, $krb5_sbin_dir);
1717

18-
if ($^O eq 'darwin')
18+
if ($^O eq 'darwin' && -d "/opt/homebrew" )
1919
{
20+
# typical paths for Homebrew on ARM
21+
$krb5_bin_dir = '/opt/homebrew/opt/krb5/bin';
22+
$krb5_sbin_dir = '/opt/homebrew/opt/krb5/sbin';
23+
}
24+
elsif ($^O eq 'darwin')
25+
{
26+
# typical paths for Homebrew on Intel
2027
$krb5_bin_dir = '/usr/local/opt/krb5/bin';
2128
$krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
2229
}

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)
0