Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v5.1] Mac PM test: Require pre-installed rosetta #22889

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions contrib/cirrus/mac_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkg/machine/e2e/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"runtime"
"testing"
Expand Down Expand Up @@ -63,13 +62,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() {})
Expand Down