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

Function run

scripts/bench/agent-control-benchmark.mjs:904–928  ·  view source on GitHub ↗
(command, args, config = {})

Source from the content-addressed store, hash-verified

902}
903
904function run(command, args, config = {}) {
905 const started = performance.now();
906 const result = spawnSync(command, args, {
907 cwd: repoRoot,
908 env: { ...process.env, ...(config.env || {}) },
909 encoding: "utf8",
910 maxBuffer: 64 * 1024 * 1024,
911 timeout: config.timeoutMs || 30000,
912 });
913 const durationMs = performance.now() - started;
914 const timedOut = result.error?.code === "ETIMEDOUT";
915 const ok =
916 !timedOut && !result.error && result.status === 0 && result.signal === null;
917 return {
918 ok: ok || Boolean(config.allowFailure),
919 status: result.status,
920 signal: result.signal,
921 stdout: result.stdout || "",
922 stderr:
923 result.stderr ||
924 (result.error ? `${result.error.name}: ${result.error.message}` : ""),
925 durationMs,
926 timedOut,
927 };
928}
929
930function withNote(result, note) {
931 return { ...result, note };

Callers 13

benchmarkSimDeckFunction · 0.70
benchmarkAgentDeviceFunction · 0.70
benchmarkArgentFunction · 0.70
withSettingsRootFunction · 0.70
withSettingsPaneFunction · 0.70
argentElementCenterFunction · 0.70
startArgentToolServerFunction · 0.70
selectBootedIphoneUdidFunction · 0.70
currentScreenSizeFunction · 0.70
readVersionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected