Skip to content

Commit

Permalink
test: Always set QEMU machine type and accel
Browse files Browse the repository at this point in the history
This is needed when running `qemu-system-x86_64` instead of `qemu-kvm`

Signed-off-by: Christophe Fergeau <[email protected]>
  • Loading branch information
cfergeau committed May 16, 2024
1 parent 39f9fd7 commit 4217481
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,11 @@ func qemuExecutable() string {
}

func qemuArgs() string {
accel := "kvm"
if runtime.GOOS == "darwin" {
return "-machine q35,accel=hvf:tcg -smp 4 -cpu host"
accel = "hvf"
}
return "-cpu host"
return fmt.Sprintf("-machine q35,accel=%s:tcg -smp 4 -cpu host", accel)
}

func createSSHKeys() (string, error) {
Expand Down

0 comments on commit 4217481

Please sign in to comment.