Repository navigation
Commit 78c0ca4
authored
refactor(ios): point xcodebuild at the scoped simulator set and delete the XCTestDevices redirect (#2963)
* fix(ios-runner): resolve scoped simulators via -DVTSimulatorSetLocation, not a redirect
xcodebuild resolves a simulator in a custom CoreSimulator set through the
DVTSimulatorSetLocation Xcode user default, passed as -DVTSimulatorSetLocation=<set>.
Every runner xcodebuild phase (build-for-testing and test-without-building) now
names the scoped set beside its -destination, so the runner never needs
~/Library/Developer/XCTestDevices. Xcode's first-launch cleanup deletes every
device in XCTestDevices, and while it was a symlink into the user's set that
cleanup deleted the user's simulators (#2935).
Deleted: the XCTestDevices rename/symlink/reconcile machinery, the host-global
xctest-device-set.lock, the session redirect handle and its releases, the
simulator_set_redirect handoff refusal and the scoped-set adoption refusal.
A simulator runner start puts back a symlink or XCTestDevices.agent-device-backup
an older version left behind. A destination xcodebuild cannot find for a scoped
set fails with details.reason simulator_set_destination_not_found, naming
details.simulatorSetPath and details.xcodeVersion, in both xcodebuild phases.
Closes #2935
* fix(daemon): keep a scoped simulator set's runner warm on close
close stopped the runner of a simulator in a scoped set only because that
runner held the XCTestDevices redirect and its host-global lock for its
lifetime (#1013). The redirect is gone, so a scoped-set runner is retained
under idle-stop like a default-set one.
* fix(ios-runner): undo only an XCTestDevices redirect agent-device left behind
The legacy cleanup unlinked any XCTestDevices symlink on every simulator
startup, so a host that links XCTestDevices to another volume lost the
link on a default-set open. A symlink is now removed only when the
agent-device backup sits beside it, or when it points at this runner's
own scoped simulator set.
* fix(ios-runner): scope runner reuse to one simulator set and name the set in destination errors
- Reuse and lease adoption now require the same simulator: one udid in one
resolved simulator set. The lease records the scoped set; a runner leased
or registered for another set is stopped and restarted, never reused.
- The runner derives a simulator's set through simulatorAddressFor, which
now resolves the set path, instead of restating the simulator predicate.
- simulator_set_destination_not_found names the set and the selected Xcode
in its message. The Xcode version comes from the toolchain fingerprint
owner, so external and adopted sessions report it too; the artifact no
longer carries its own copy. The hint points at the error instead of
printing field names.
- The legacy XCTestDevices restore runs before adoption, so both startup
routes pass through it, and a step another daemon already took counts
as done instead of failing the startup.
* refactor(ios-runner): split the session-serving check and the legacy restore steps into helpers
* test(ios-runner): pin the scoped-set destination rule to captured Xcode 26.2 output
The simulator_set_destination_not_found fixtures were invented text. They
are now the output Xcode 26.2 (17C52) printed for the runner's own
build-for-testing and test-without-building argv, with the destination
naming a scoped-set udid and -DVTSimulatorSetLocation naming a set that
does not hold it, and for the same build without the key. Destination
lines that identify the host's hardware and simulators are left out.
* refactor(ios-runner): put back a legacy XCTestDevices redirect once, at daemon startup
The restore ran on every simulator runner start and reached the session
through a runner-xctestrun re-export. It is now one daemon-startup step on
the platform owner lifecycle, after daemon.log publication. Without a
device to compare against, it removes any symlink at XCTestDevices, as
released versions did on every scoped runner start, and restores the
agent-device backup. Each repair and any failure is recorded in daemon.log;
a failure stops neither the daemon nor a runner start, because the runner
no longer reads XCTestDevices.1 parent 9a09675 commit 78c0ca4
45 files changed
Lines changed: 847 additions & 1399 deletions
File tree
- packages/platform-apple/src
- core
- __tests__
- runner
- __tests__
- src
- __tests__
- commands/schema
- daemon
- handlers/__tests__
- server
- website/docs/docs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| |||
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
328 | 329 | | |
| 330 | + | |
329 | 331 | | |
330 | | - | |
331 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
332 | 358 | | |
333 | 359 | | |
334 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | | - | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
| |||
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
116 | | - | |
117 | 113 | | |
118 | 114 | | |
119 | 115 | | |
| |||
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
171 | | - | |
172 | 167 | | |
173 | 168 | | |
174 | 169 | | |
| |||
This file was deleted.
0 commit comments