Bug 2037075 added an early-return at the end of main() so mozharness sees
exit 0 on Apple Virtualization Framework VMs and tests proceed instead of
halting at the gate. That fix is functionally correct, but get_refresh_rate()
and get_resolution() still execute first and emit:
INFO - Refresh Rate: Hz
INFO - ERROR: expected refresh rate = 60.00, instead got .
INFO - Resolution:
INFO - ERROR: expected resolution = 1920 x 1080, instead got .
This shows up in every macOS test log on VM workers and is misleading
during debugging — anyone scanning a green log will see ERROR lines and
assume the script is broken.
Short-circuit each function at its top when is_virtual_machine() is True,
emitting a single informational line. Hardware workers (hw.model = Mac16,10
etc.) bypass the new branch and hit the existing logic with halt_on_failure
unchanged. The early-return in main() from Bug 2037075 stays as
defense-in-depth.
Differential Revision: https://phabricator.services.mozilla.com/D298859