diff --git a/contrib/cirrus/mac_setup.sh b/contrib/cirrus/mac_setup.sh index a2aad68438..b51130247b 100755 --- a/contrib/cirrus/mac_setup.sh +++ b/contrib/cirrus/mac_setup.sh @@ -7,6 +7,14 @@ set -euo pipefail +# Confirm rosetta is installed/enabled and working +if ! arch -arch x86_64 /usr/bin/uname -m; then + # This likely means whatever script used to prepare this mac failed + # and/or did not execute `sudo softwareupdate --install-rosetta --agree-to-license` + echo "Rosetta doesn't appear to be installed, or is non-functional." + exit 1 +fi + # The otherwise standard `/etc/ci_environment` file cannot be used in this # context, because the system is shared for multiple tasks. Instead, persist # env. vars required during /subsequent/ testing steps via a "magic" Cirrus-CI diff --git a/pkg/machine/e2e/machine_test.go b/pkg/machine/e2e/machine_test.go index 2fa7e1d5a5..6a3d60b6bb 100644 --- a/pkg/machine/e2e/machine_test.go +++ b/pkg/machine/e2e/machine_test.go @@ -5,7 +5,6 @@ import ( "fmt" "io" "os" - "os/exec" "path/filepath" "runtime" "strings" @@ -70,13 +69,6 @@ var _ = BeforeSuite(func() { if pullError != nil { Fail(fmt.Sprintf("failed to pull wsl disk: %q", pullError)) } - if testProvider.VMType() == define.AppleHvVirt { - cmd := exec.Command("softwareupdate", "--install-rosetta", "--agree-to-license") - err := cmd.Run() - if err != nil { - Fail(fmt.Sprintf("Command failed with error: %q", err)) - } - } }) var _ = SynchronizedAfterSuite(func() {}, func() {})