aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-01-01 10:45:18 +1300
committerThomas Munro <tmunro@postgresql.org>2023-01-01 10:45:18 +1300
commit14d63dd2523c5292c4fcab4f45a7f534859c4518 (patch)
tree062e20724ee565ad5a2ab04b7e41453852f3b5e2 /src
parent8ad51b5f446b5c19ba2c0033a0f7b3180b3b6d95 (diff)
downloadpostgresql-14d63dd2523c5292c4fcab4f45a7f534859c4518.tar.gz
postgresql-14d63dd2523c5292c4fcab4f45a7f534859c4518.zip
ci: Change macOS builds from Intel to ARM.
Cirrus is about to shut down its macOS-on-Intel support, so it's time to move our CI testing over to ARM instances. The Homebrew package manager changed its default installation prefix for the new architecture, so a couple of tests need tweaks to find binaries. Back-patch to 15, where in-tree CI began. Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20221122225744.GF11463%40telsasoft.com
Diffstat (limited to 'src')
-rw-r--r--src/test/kerberos/t/001_auth.pl9
-rw-r--r--src/test/ldap/t/001_auth.pl8
2 files changed, 15 insertions, 2 deletions
diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index a2bc8a5351e..298dc0c62b1 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -32,8 +32,15 @@ elsif ($ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
my ($krb5_bin_dir, $krb5_sbin_dir);
-if ($^O eq 'darwin')
+if ($^O eq 'darwin' && -d "/opt/homebrew" )
{
+ # typical paths for Homebrew on ARM
+ $krb5_bin_dir = '/opt/homebrew/opt/krb5/bin';
+ $krb5_sbin_dir = '/opt/homebrew/opt/krb5/sbin';
+}
+elsif ($^O eq 'darwin')
+{
+ # typical paths for Homebrew on Intel
$krb5_bin_dir = '/usr/local/opt/krb5/bin';
$krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
}
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index 0ea274c383e..39736e5116e 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -21,9 +21,15 @@ elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
{
plan skip_all => 'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
}
+elsif ($^O eq 'darwin' && -d '/opt/homebrew/opt/openldap')
+{
+ # typical paths for Homebrew on ARM
+ $slapd = '/opt/homebrew/opt/openldap/libexec/slapd';
+ $ldap_schema_dir = '/opt/homebrew/etc/openldap/schema';
+}
elsif ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
{
- # typical paths for Homebrew
+ # typical paths for Homebrew on Intel
$slapd = '/usr/local/opt/openldap/libexec/slapd';
$ldap_schema_dir = '/usr/local/etc/openldap/schema';
}