INNER CODE UNIT · Go
TestPublishWaitsForVMLookup
openai/tart · integration-tests/clone_lock_darwin_test.go:78
func TestPublishWaitsForVMLookup(t *testing.T) {
for _, operation := range []string{"create", "rename"} {
t.Run(operation, func(t *testing.T) {
if operation == "create" {
// Create validates a VM configuration even without booting it.
// Hosted macOS guests may not expose hardware virtualization.
supported, err := syscall.SysctlUint32("kern.hv_support")
if err != nil {
t.Fatalf("check hypervisor support: %v", err)
}
if supported == 0 {
t.Skip("create requires hardware virtualization; kern.hv_support is 0")
}
}
home := t.TempDir()
t.Setenv("TART_HOME", home)
t.Setenv("TART_NO_AUTO_PRUNE", "1")