MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / createTestDeviceExecutor

Function createTestDeviceExecutor

src/mcp/tools/device/test_device.ts:119–151  ·  view source on GitHub ↗
(
  executor: CommandExecutor = getDefaultCommandExecutor(),
  fileSystemExecutor: FileSystemExecutor = getDefaultFileSystemExecutor(),
  prepared?: PreparedTestDeviceExecution,
)

Source from the content-addressed store, hash-verified

117}
118
119export 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
153export async function testDeviceLogic(
154 params: TestDeviceParams,

Callers 1

testDeviceLogicFunction · 0.85

Calls 4

createTestExecutorFunction · 0.90

Tested by

no test coverage detected