( executor: CommandExecutor = getDefaultCommandExecutor(), fileSystemExecutor: FileSystemExecutor = getDefaultFileSystemExecutor(), prepared?: PreparedTestDeviceExecution, )
| 117 | } |
| 118 | |
| 119 | export function createTestDeviceExecutor( |
| 120 | executor: CommandExecutor = getDefaultCommandExecutor(), |
| 121 | fileSystemExecutor: FileSystemExecutor = getDefaultFileSystemExecutor(), |
| 122 | prepared?: PreparedTestDeviceExecution, |
| 123 | ): StreamingExecutor<TestDeviceParams, TestDeviceResult> { |
| 124 | return async (params, ctx) => { |
| 125 | const resolved = prepared ?? (await prepareTestDeviceExecution(params, fileSystemExecutor)); |
| 126 | const executeTest = createTestExecutor(executor, { |
| 127 | preflight: resolved.preflight, |
| 128 | toolName: 'test_device', |
| 129 | target: 'device', |
| 130 | request: resolved.invocationRequest, |
| 131 | }); |
| 132 | |
| 133 | return executeTest( |
| 134 | { |
| 135 | projectPath: params.projectPath, |
| 136 | workspacePath: params.workspacePath, |
| 137 | scheme: params.scheme, |
| 138 | deviceId: params.deviceId, |
| 139 | configuration: resolved.configuration, |
| 140 | derivedDataPath: params.derivedDataPath, |
| 141 | extraArgs: params.extraArgs, |
| 142 | preferXcodebuild: params.preferXcodebuild ?? false, |
| 143 | platform: resolved.platform, |
| 144 | useLatestOS: false, |
| 145 | testRunnerEnv: params.testRunnerEnv, |
| 146 | progress: params.progress, |
| 147 | }, |
| 148 | ctx, |
| 149 | ); |
| 150 | }; |
| 151 | } |
| 152 | |
| 153 | export async function testDeviceLogic( |
| 154 | params: TestDeviceParams, |
no test coverage detected