[CHORE] Fix integration test runner timeout & isolate inner DerivedData#261
Merged
Conversation
When `xcodebuild test` exits non-zero the existing logs truncate right where the failure footer lands, so we can't see which Swift Testing expectation/run actually failed. Upload the xcresults from DerivedData on failure (zipped to keep the artifact upload fast) so we have the real test events next time the matrix goes red. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The xcresult from the failing visionOS job had it: "The test runner timed out while preparing to run tests." xcodebuild gates the xctest runner's "ready to run" handshake on Swift Testing trait `prepare(for:)` finishing, with a multi-minute cap. `BuildProvider.prepare(for:)` was calling `XcodeTestRunner.build()` — `xcrun simctl boot` plus `xcodebuild build-for-testing` — which can run several minutes on a cold checkout, blowing the cap. Keep simulator boot in `prepare(for:)` (cheap) and move the module build into `provideScope(for:performing:)`, which runs after the preparation handshake completes and is governed by the per-test execution allowance instead. Inner xcodebuilds also get an isolated `-derivedDataPath` so their SWBBuildService can't evict cached build descriptions out from under the outer test process — that contention matched the duplicate-blueprint warnings and mid-build aborts seen in the original logs. Also collect xcresults from the new isolated DerivedData in the on-failure artifact upload. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This comment has been minimized.
This comment has been minimized.
anmarchenko
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xcodebuild build-for-testingout of Swift Testing'sprepare(for:)and intoprovideScope(for:performing:). xcodebuild gates the xctest "ready to run" handshake on trait preparation finishing within a multi-minute cap; the inner build is well over that on cold checkouts and trips "The test runner timed out while preparing to run tests" (confirmed via xcresult on a failing visionOS run). Simulator boot stays inprepare(for:)because it's cheap.xcodebuildinvocations now use an isolated-derivedDataPath $SRCROOT/build/integration-DerivedDataso the inner SWBBuildService can't evict the outer test bundle's cached build descriptions mid-run. This matches the duplicate-blueprint warnings and mid-build aborts seen in the original CI logs.failure(), the workflow now zips and uploads every*.xcresultfrom both DerivedData roots as a separate artifact, so future failures don't truncate the way the original logs did.Test plan
workflow_dispatchacross the full matrix (Xcode 26.2 / 26.4 × macOS / iOSsim / tvOSsim / watchOSsim / visionOSsim).*-integration-xcresultartifact is attached and openable withxcrun xcresulttool.🤖 Generated with Claude Code