Repository navigation
Add virtual display for XCUITests on headless Depot runners - #721
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (2)
✏️ Tip: You can disable in-progress messages and the fortune message in your review settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0d58e2f63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| echo "" | ||
| clang -framework Foundation -framework CoreGraphics \ | ||
| -o /tmp/create-virtual-display scripts/create-virtual-display.m | ||
| /tmp/create-virtual-display & |
There was a problem hiding this comment.
Fail if virtual display process dies after launch
Starting the helper with /tmp/create-virtual-display & does not propagate its runtime failure to the step, so if CGVirtualDisplay is unavailable (or the helper exits for any reason), this step still succeeds and the workflow proceeds with no active display; UI tests then fail later with unrelated foreground-activation errors. Because set -e does not monitor background jobs, this should explicitly verify the process is still alive (or that a display appeared) before continuing.
Useful? React with 👍 / 👎.
Depot macOS runners have no physical display, causing XCUITests to fail with "Failed to activate application (current state: Running Background)". This adds a small ObjC tool that creates a virtual display using the private CGVirtualDisplay API before tests run.
a0d58e2 to
48a1dca
Compare
Greptile SummaryAdds virtual display support for headless Depot macOS runners to fix XCUITest failures. Creates a 1920x1080@60Hz virtual display using the private
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 48a1dca |
Depot macOS runners have no physical display, causing XCUITests to fail with "Failed to activate application (current state: Running Background)". This adds a small ObjC tool that creates a virtual display using the private CGVirtualDisplay API before tests run.
Summary
system_profiler SPDisplaysDataTypereturns empty, and XCUITests fail withFailed to activate application (current state: Running Background)because macOS can't bring the app to foreground without a display.scripts/create-virtual-display.m, a small ObjC tool that creates a 1920x1080 virtual display using the privateCGVirtualDisplayAPI (same approach used by Chromium CI). Runs as a background process during the workflow, dies when the step completes.Testing
clang -framework Foundation -framework CoreGraphics -o /tmp/create-virtual-display scripts/create-virtual-display.m && /tmp/create-virtual-displayproducesVirtual display created: 1920x1080@60Hz (displayID: 10)gh workflow run test-depot.yml -f skip_unit_tests=true -f test_filter=UpdatePillUITestsRelated
Summary by CodeRabbit
Release Notes