



























@@ -123,6 +123,11 @@ function createFakeProcess() {
123123}) as unknown as NodeJS.Process;
124124}
125125126+// Launcher plumbing tests do not need the real runtime artifact copier.
127+async function skipRuntimePostBuild(): Promise<void> {
128+return;
129+}
130+126131function firstMockCall<T extends unknown[]>(mock: { mock: { calls: T[] } }): T | undefined {
127132return mock.mock.calls[0];
128133}
@@ -401,6 +406,7 @@ describe("run-node script", () => {
401406OPENCLAW_RUNNER_LOG: "0",
402407},
403408 spawn,
409+runRuntimePostBuild: skipRuntimePostBuild,
404410execPath: process.execPath,
405411platform: process.platform,
406412});
@@ -493,6 +499,7 @@ describe("run-node script", () => {
493499OPENCLAW_RUNNER_LOG: "0",
494500},
495501 spawn,
502+runRuntimePostBuild: skipRuntimePostBuild,
496503execPath: process.execPath,
497504platform: process.platform,
498505});
@@ -549,6 +556,7 @@ describe("run-node script", () => {
549556 spawn,
550557stderr: mutedStream,
551558stdout: mutedStream,
559+runRuntimePostBuild: skipRuntimePostBuild,
552560execPath: process.execPath,
553561platform: process.platform,
554562} as Parameters<typeof runNodeMain>[0] & { stdout: NodeJS.WriteStream });
@@ -609,6 +617,7 @@ describe("run-node script", () => {
609617 spawn,
610618 stdout,
611619 stderr,
620+runRuntimePostBuild: skipRuntimePostBuild,
612621execPath: process.execPath,
613622platform: process.platform,
614623} as Parameters<typeof runNodeMain>[0] & {
@@ -664,6 +673,7 @@ describe("run-node script", () => {
664673 spawn,
665674 stderr,
666675 stdout,
676+runRuntimePostBuild: skipRuntimePostBuild,
667677execPath: process.execPath,
668678platform: process.platform,
669679} as Parameters<typeof runNodeMain>[0] & { stdout: NodeJS.WriteStream });
@@ -721,6 +731,7 @@ describe("run-node script", () => {
721731},
722732 spawn,
723733 spawnSync,
734+runRuntimePostBuild: skipRuntimePostBuild,
724735execPath: process.execPath,
725736platform: process.platform,
726737process: createFakeProcess(),
@@ -780,6 +791,7 @@ describe("run-node script", () => {
780791},
781792 spawn,
782793 spawnSync,
794+runRuntimePostBuild: skipRuntimePostBuild,
783795execPath: process.execPath,
784796platform: process.platform,
785797process: createFakeProcess(),
@@ -822,6 +834,7 @@ describe("run-node script", () => {
822834},
823835 spawn,
824836 spawnSync,
837+runRuntimePostBuild: skipRuntimePostBuild,
825838execPath: process.execPath,
826839platform: process.platform,
827840});
@@ -856,6 +869,7 @@ describe("run-node script", () => {
856869 spawn,
857870stderr: mutedStream,
858871stdout: mutedStream,
872+runRuntimePostBuild: skipRuntimePostBuild,
859873execPath: process.execPath,
860874platform: process.platform,
861875} as Parameters<typeof runNodeMain>[0] & { stdout: NodeJS.WriteStream });
@@ -888,6 +902,7 @@ describe("run-node script", () => {
888902 spawn,
889903stderr: mutedStream,
890904stdout: mutedStream,
905+runRuntimePostBuild: skipRuntimePostBuild,
891906execPath: process.execPath,
892907platform: process.platform,
893908} as Parameters<typeof runNodeMain>[0] & { stdout: NodeJS.WriteStream });
@@ -913,7 +928,12 @@ describe("run-node script", () => {
913928gitHead: "abc123\n",
914929gitStatus: "",
915930});
916-const exitCode = await runStatusCommand({ tmp, spawn, spawnSync });
931+const exitCode = await runStatusCommand({
932+ tmp,
933+ spawn,
934+ spawnSync,
935+runRuntimePostBuild: skipRuntimePostBuild,
936+});
917937918938expect(exitCode).toBe(0);
919939expect(spawnCalls).toEqual([statusCommandSpawn()]);
@@ -942,7 +962,12 @@ describe("run-node script", () => {
942962gitHead: "abc123\n",
943963gitStatus: "",
944964});
945-const exitCode = await runQaCommand({ tmp, spawn, spawnSync });
965+const exitCode = await runQaCommand({
966+ tmp,
967+ spawn,
968+ spawnSync,
969+runRuntimePostBuild: skipRuntimePostBuild,
970+});
946971947972expect(exitCode).toBe(0);
948973expect(spawnCalls).toEqual([
@@ -975,7 +1000,12 @@ describe("run-node script", () => {
9751000gitHead: "abc123\n",
9761001gitStatus: "",
9771002});
978-const exitCode = await runQaCommand({ tmp, spawn, spawnSync });
1003+const exitCode = await runQaCommand({
1004+ tmp,
1005+ spawn,
1006+ spawnSync,
1007+runRuntimePostBuild: skipRuntimePostBuild,
1008+});
97910099801010expect(exitCode).toBe(0);
9811011expect(spawnCalls).toEqual([
@@ -1528,6 +1558,7 @@ describe("run-node script", () => {
15281558},
15291559process: fakeProcess,
15301560 spawn,
1561+runRuntimePostBuild: skipRuntimePostBuild,
15311562execPath: process.execPath,
15321563});
15331564@@ -1560,7 +1591,12 @@ describe("run-node script", () => {
15601591});
1561159215621593const { spawnCalls, spawn, spawnSync } = createSpawnRecorder();
1563-const exitCode = await runStatusCommand({ tmp, spawn, spawnSync });
1594+const exitCode = await runStatusCommand({
1595+ tmp,
1596+ spawn,
1597+ spawnSync,
1598+runRuntimePostBuild: skipRuntimePostBuild,
1599+});
1564160015651601expect(exitCode).toBe(0);
15661602expect(spawnCalls).toEqual([
@@ -1627,7 +1663,12 @@ describe("run-node script", () => {
16271663gitHead: "def456\n",
16281664gitStatus: "",
16291665});
1630-const exitCode = await runStatusCommand({ tmp, spawn, spawnSync });
1666+const exitCode = await runStatusCommand({
1667+ tmp,
1668+ spawn,
1669+ spawnSync,
1670+runRuntimePostBuild: skipRuntimePostBuild,
1671+});
1631167216321673expect(exitCode).toBe(0);
16331674expect(spawnCalls).toEqual([
@@ -1688,7 +1729,12 @@ describe("run-node script", () => {
16881729gitHead: "abc123\n",
16891730gitStatus: ` M ${EXTENSION_README}\n`,
16901731});
1691-const exitCode = await runStatusCommand({ tmp, spawn, spawnSync });
1732+const exitCode = await runStatusCommand({
1733+ tmp,
1734+ spawn,
1735+ spawnSync,
1736+runRuntimePostBuild: skipRuntimePostBuild,
1737+});
1692173816931739expect(exitCode).toBe(0);
16941740expect(spawnCalls).toEqual([statusCommandSpawn()]);
@@ -2521,7 +2567,12 @@ describe("run-node script", () => {
25212567});
2522256825232569const { spawnCalls, spawn, spawnSync } = createSpawnRecorder();
2524-const exitCode = await runStatusCommand({ tmp, spawn, spawnSync });
2570+const exitCode = await runStatusCommand({
2571+ tmp,
2572+ spawn,
2573+ spawnSync,
2574+runRuntimePostBuild: skipRuntimePostBuild,
2575+});
2525257625262577expect(exitCode).toBe(0);
25272578expect(spawnCalls).toEqual([statusCommandSpawn()]);
@@ -2544,7 +2595,12 @@ describe("run-node script", () => {
25442595gitHead: "abc123\n",
25452596gitStatus: "",
25462597});
2547-const exitCode = await runStatusCommand({ tmp, spawn, spawnSync });
2598+const exitCode = await runStatusCommand({
2599+ tmp,
2600+ spawn,
2601+ spawnSync,
2602+runRuntimePostBuild: skipRuntimePostBuild,
2603+});
2548260425492605expect(exitCode).toBe(0);
25502606expect(spawnCalls).toEqual([
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。