MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / restartSimulatorForFixtureLaunch

Function restartSimulatorForFixtureLaunch

scripts/integration/cli.mjs:1021–1050  ·  view source on GitHub ↗
(label)

Source from the content-addressed store, hash-verified

1019}
1020
1021async function restartSimulatorForFixtureLaunch(label) {
1022 await measuredStep(
1023 `${label} recovery shutdown`,
1024 () => shutdownSimulatorIfNeeded(simulatorUDID),
1025 { phase: phaseSetup },
1026 );
1027 await measuredStep(
1028 `${label} recovery boot`,
1029 () =>
1030 retrySimdeckJson(["boot", simulatorUDID], `${label} recovery boot`, {
1031 attempts: 3,
1032 delayMs: 3_000,
1033 timeoutMs: 180_000,
1034 }),
1035 { phase: phaseSetup },
1036 );
1037 await measuredStep(
1038 `${label} recovery bootstatus`,
1039 () =>
1040 runText("xcrun", ["simctl", "bootstatus", simulatorUDID, "-b"], {
1041 timeoutMs: 600_000,
1042 }),
1043 { phase: phaseSetup },
1044 );
1045 await measuredStep(
1046 `${label} recovery fixture registration`,
1047 waitForFixtureRegistration,
1048 { phase: phaseSetup },
1049 );
1050}
1051
1052async function waitForFixtureRegistration() {
1053 let lastError = null;

Callers 1

Calls 4

measuredStepFunction · 0.70
retrySimdeckJsonFunction · 0.70
runTextFunction · 0.70

Tested by

no test coverage detected