| 151 | } |
| 152 | |
| 153 | export async function testDeviceLogic( |
| 154 | params: TestDeviceParams, |
| 155 | executor: CommandExecutor = getDefaultCommandExecutor(), |
| 156 | fileSystemExecutor: FileSystemExecutor = getDefaultFileSystemExecutor(), |
| 157 | ): Promise<void> { |
| 158 | const ctx = getHandlerContext(); |
| 159 | const prepared = await prepareTestDeviceExecution(params, fileSystemExecutor); |
| 160 | |
| 161 | ctx.emit(createBuildInvocationFragment('test-result', 'TEST', prepared.invocationRequest)); |
| 162 | const executionContext = createStreamingExecutionContext(ctx); |
| 163 | const executeTestDevice = createTestDeviceExecutor(executor, fileSystemExecutor, prepared); |
| 164 | const result = await executeTestDevice(params, executionContext); |
| 165 | |
| 166 | setXcodebuildStructuredOutput(ctx, 'test-result', result); |
| 167 | } |
| 168 | |
| 169 | export const schema = getSessionAwareToolSchemaShape({ |
| 170 | sessionAware: publicSchemaObject, |