()
| 256 | } |
| 257 | |
| 258 | async function recycleSimulatorForFixtureLaunch() { |
| 259 | try { |
| 260 | simdeckJson(["shutdown", simulatorUDID], { |
| 261 | timeoutMs: 180_000, |
| 262 | }); |
| 263 | } catch (error) { |
| 264 | console.warn( |
| 265 | `WebRTC fixture recovery shutdown failed; continuing with boot: ${error?.message ?? error}`, |
| 266 | ); |
| 267 | } |
| 268 | await retrySimdeckJson( |
| 269 | ["boot", simulatorUDID], |
| 270 | "WebRTC fixture recovery boot", |
| 271 | { |
| 272 | attempts: 3, |
| 273 | delayMs: 3_000, |
| 274 | timeoutMs: simdeckBootTimeoutMs, |
| 275 | }, |
| 276 | ); |
| 277 | runText("xcrun", ["simctl", "bootstatus", simulatorUDID, "-b"], { |
| 278 | timeoutMs: 600_000, |
| 279 | }); |
| 280 | } |
| 281 | |
| 282 | function simdeckJson(args, options = {}) { |
| 283 | return JSON.parse(runText(simdeck, args, options)); |
no test coverage detected