Investigate detecting Apple VM hosts instead of hardcoding ACES VM signal
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
## Summary
We currently hardcode ACES as a virtual-machine signal in CI by setting `VM_VENDOR=ACES` in the test stage template so that tests guarded by `TestRuntime.AssertNotVirtualMachine()` get ignored.
Rolf pointed out that we may be able to detect this from `system_profiler` instead of hardcoding it, for example from hardware information such as:
```text
Hardware:
Hardware Overview:
Model Name: Apple Virtual Machine 1
Model Identifier: VirtualMac2,1
Model Number: VM0001LL/A
Chip: Apple M4 Pro (Virtual)
```
## Current state
- `tools/devops/automation/templates/tests/stage.yml` sets `VM_VENDOR: ACES` when `useACES` is enabled.
- `tests/common/TestRuntime.cs` uses `VM_VENDOR` to decide whether tests should ignore on VMs.
- `tools/devops/automation/scripts/show_bot_info.ps1` already captures `system_profiler` output in CI logs.
## Proposed follow-up
Investigate replacing or augmenting the hardcoded `VM_VENDOR=ACES` path with host-side VM detection based on `system_profiler` output (or equivalent machine metadata), and then propagate a normalized VM signal to the relevant test processes.
## Notes
- The current hardcoded approach is fine for now.
- The follow-up should make sure simulator/device behavior stays correct and avoid regressing non-ACES pools.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.