Fix UI test hang: bypass launch guard for XCUITest apps
XCUITest launches the app as a separate process that doesn't inherit XCTest env vars (XCTestConfigurationFilePath, etc.), so isRunningUnderXCTest() returns false. The app then hits shouldBlockUntaggedDebugLaunch() and exits with code 64, causing the test runner to hang waiting for the app to launch. Fix: detect CMUX_UI_TEST_* env vars set via XCUIApplication.launchEnvironment and skip the launch guard. Also revert the failed CMUX_TAG ci.yml workaround.
This commit is contained in:
parent
77a59b5743
commit
4d2fd30143
3 changed files with 18 additions and 5 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -91,11 +91,7 @@ jobs:
|
|||
rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
|
||||
- name: Run UI tests
|
||||
env:
|
||||
# Debug builds require CMUX_TAG to prevent accidental untagged launches.
|
||||
# XCUITest launches the app as a separate process without XCTest env vars,
|
||||
# so the app's isRunningUnderXCTest() check fails. Provide a tag explicitly.
|
||||
CMUX_TAG: ci
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# Run directly on the self-hosted macOS runner.
|
||||
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination "platform=macOS" -only-testing:cmuxUITests/UpdatePillUITests test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue