( params: TestDeviceParams, fileSystemExecutor: FileSystemExecutor, )
| 80 | } |
| 81 | |
| 82 | async function prepareTestDeviceExecution( |
| 83 | params: TestDeviceParams, |
| 84 | fileSystemExecutor: FileSystemExecutor, |
| 85 | ): Promise<PreparedTestDeviceExecution> { |
| 86 | const configuration = params.configuration ?? 'Debug'; |
| 87 | const platform = mapDevicePlatform(params.platform); |
| 88 | const preflight = await resolveTestPreflight( |
| 89 | { |
| 90 | projectPath: params.projectPath, |
| 91 | workspacePath: params.workspacePath, |
| 92 | scheme: params.scheme, |
| 93 | configuration, |
| 94 | extraArgs: params.extraArgs, |
| 95 | destinationName: params.deviceId, |
| 96 | }, |
| 97 | fileSystemExecutor, |
| 98 | ); |
| 99 | |
| 100 | return { |
| 101 | configuration, |
| 102 | platform, |
| 103 | preflight: preflight ?? undefined, |
| 104 | invocationRequest: { |
| 105 | scheme: params.scheme, |
| 106 | workspacePath: params.workspacePath, |
| 107 | projectPath: params.projectPath, |
| 108 | derivedDataPath: resolveEffectiveDerivedDataPath(params), |
| 109 | configuration, |
| 110 | platform: String(platform), |
| 111 | deviceId: params.deviceId, |
| 112 | target: 'device' as const, |
| 113 | onlyTesting: preflight?.selectors.onlyTesting.map((selector) => selector.raw), |
| 114 | skipTesting: preflight?.selectors.skipTesting.map((selector) => selector.raw), |
| 115 | } satisfies BuildInvocationRequest, |
| 116 | }; |
| 117 | } |
| 118 | |
| 119 | export function createTestDeviceExecutor( |
| 120 | executor: CommandExecutor = getDefaultCommandExecutor(), |
no test coverage detected