



























@@ -6,12 +6,42 @@ import { fileURLToPath } from "node:url";
6677const ROOT_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
88const DEFAULT_E2E_IMAGE = "openclaw-docker-e2e:local";
9-const DEFAULT_PARALLELISM = 8;
10-const DEFAULT_TAIL_PARALLELISM = 8;
9+const DEFAULT_PARALLELISM = 10;
10+const DEFAULT_TAIL_PARALLELISM = 10;
1111const DEFAULT_FAILURE_TAIL_LINES = 80;
1212const DEFAULT_LANE_TIMEOUT_MS = 120 * 60 * 1000;
1313const DEFAULT_LANE_START_STAGGER_MS = 2_000;
141415+const bundledChannelLaneCommand =
16+"OPENCLAW_SKIP_DOCKER_BUILD=1 OPENCLAW_BUNDLED_CHANNEL_UPDATE_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_ROOT_OWNED_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_SETUP_ENTRY_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_LOAD_FAILURE_SCENARIO=0 pnpm test:docker:bundled-channel-deps";
17+18+const bundledScenarioLanes = [
19+["bundled-channel-telegram", `OPENCLAW_BUNDLED_CHANNELS=telegram ${bundledChannelLaneCommand}`],
20+["bundled-channel-discord", `OPENCLAW_BUNDLED_CHANNELS=discord ${bundledChannelLaneCommand}`],
21+["bundled-channel-slack", `OPENCLAW_BUNDLED_CHANNELS=slack ${bundledChannelLaneCommand}`],
22+["bundled-channel-feishu", `OPENCLAW_BUNDLED_CHANNELS=feishu ${bundledChannelLaneCommand}`],
23+[
24+"bundled-channel-memory-lancedb",
25+`OPENCLAW_BUNDLED_CHANNELS=memory-lancedb ${bundledChannelLaneCommand}`,
26+],
27+[
28+"bundled-channel-update",
29+"OPENCLAW_SKIP_DOCKER_BUILD=1 OPENCLAW_BUNDLED_CHANNEL_SCENARIOS=0 OPENCLAW_BUNDLED_CHANNEL_UPDATE_SCENARIO=1 OPENCLAW_BUNDLED_CHANNEL_ROOT_OWNED_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_SETUP_ENTRY_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_LOAD_FAILURE_SCENARIO=0 pnpm test:docker:bundled-channel-deps",
30+],
31+[
32+"bundled-channel-root-owned",
33+"OPENCLAW_SKIP_DOCKER_BUILD=1 OPENCLAW_BUNDLED_CHANNEL_SCENARIOS=0 OPENCLAW_BUNDLED_CHANNEL_UPDATE_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_ROOT_OWNED_SCENARIO=1 OPENCLAW_BUNDLED_CHANNEL_SETUP_ENTRY_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_LOAD_FAILURE_SCENARIO=0 pnpm test:docker:bundled-channel-deps",
34+],
35+[
36+"bundled-channel-setup-entry",
37+"OPENCLAW_SKIP_DOCKER_BUILD=1 OPENCLAW_BUNDLED_CHANNEL_SCENARIOS=0 OPENCLAW_BUNDLED_CHANNEL_UPDATE_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_ROOT_OWNED_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_SETUP_ENTRY_SCENARIO=1 OPENCLAW_BUNDLED_CHANNEL_LOAD_FAILURE_SCENARIO=0 pnpm test:docker:bundled-channel-deps",
38+],
39+[
40+"bundled-channel-load-failure",
41+"OPENCLAW_SKIP_DOCKER_BUILD=1 OPENCLAW_BUNDLED_CHANNEL_SCENARIOS=0 OPENCLAW_BUNDLED_CHANNEL_UPDATE_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_ROOT_OWNED_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_SETUP_ENTRY_SCENARIO=0 OPENCLAW_BUNDLED_CHANNEL_LOAD_FAILURE_SCENARIO=1 pnpm test:docker:bundled-channel-deps",
42+],
43+];
44+1545const lanes = [
1646["live-models", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-models"],
1747["live-gateway", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-gateway"],
@@ -37,7 +67,7 @@ const lanes = [
3767["plugins", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:plugins"],
3868["plugin-update", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:plugin-update"],
3969["config-reload", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:config-reload"],
40-["bundled-channel-deps", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:bundled-channel-deps"],
70+...bundledScenarioLanes,
4171["openai-image-auth", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:openai-image-auth"],
4272["qr", "pnpm test:docker:qr"],
4373];
@@ -53,7 +83,9 @@ const exclusiveLanes = [
5383"live-cli-backend-codex",
5484"OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-cli-backend:codex",
5585],
56-["live-acp-bind", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-acp-bind"],
86+["live-acp-bind-claude", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-acp-bind:claude"],
87+["live-acp-bind-codex", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-acp-bind:codex"],
88+["live-acp-bind-gemini", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-acp-bind:gemini"],
5789];
58905991const tailLanes = exclusiveLanes;
@@ -117,6 +149,10 @@ function commandEnv(extra = {}) {
117149};
118150}
119151152+function shellQuote(value) {
153+return `'${String(value).replaceAll("'", "'\\''")}'`;
154+}
155+120156function runShellCommand({ command, env, label, logFile, timeoutMs }) {
121157return new Promise((resolve) => {
122158const child = spawn("bash", ["-lc", command], {
@@ -176,6 +212,45 @@ async function runForeground(label, command, env) {
176212}
177213}
178214215+async function prepareBundledChannelPackage(baseEnv, logDir) {
216+if (baseEnv.OPENCLAW_BUNDLED_CHANNEL_PACKAGE_TGZ) {
217+console.log(`==> Bundled channel package: ${baseEnv.OPENCLAW_BUNDLED_CHANNEL_PACKAGE_TGZ}`);
218+return;
219+}
220+221+const packDir = path.join(logDir, "bundled-channel-package");
222+await mkdir(packDir, { recursive: true });
223+const packScript = [
224+"set -euo pipefail",
225+"node --import tsx --input-type=module -e \"const { writePackageDistInventory } = await import('./src/infra/package-dist-inventory.ts'); await writePackageDistInventory(process.cwd());\"",
226+"npm pack --silent --ignore-scripts --pack-destination /tmp/openclaw-pack >/tmp/openclaw-pack.out",
227+"cat /tmp/openclaw-pack.out",
228+].join("\n");
229+await runForeground(
230+"Pack bundled channel package once from Docker E2E image",
231+[
232+"docker run --rm",
233+"-e COREPACK_ENABLE_DOWNLOAD_PROMPT=0",
234+`-v ${shellQuote(packDir)}:/tmp/openclaw-pack`,
235+shellQuote(baseEnv.OPENCLAW_DOCKER_E2E_IMAGE),
236+"bash -lc",
237+shellQuote(packScript),
238+].join(" "),
239+baseEnv,
240+);
241+242+const packed = (await fs.promises.readdir(packDir))
243+.filter((entry) => /^openclaw-.*\.tgz$/.test(entry))
244+.toSorted()
245+.at(-1);
246+if (!packed) {
247+throw new Error(`missing packed OpenClaw tarball in ${packDir}`);
248+}
249+baseEnv.OPENCLAW_BUNDLED_CHANNEL_PACKAGE_TGZ = path.join(packDir, packed);
250+baseEnv.OPENCLAW_BUNDLED_CHANNEL_HOST_BUILD = "0";
251+console.log(`==> Bundled channel package: ${baseEnv.OPENCLAW_BUNDLED_CHANNEL_PACKAGE_TGZ}`);
252+}
253+179254function laneEnv(name, baseEnv, logDir) {
180255const env = {
181256 ...baseEnv,
@@ -358,6 +433,7 @@ async function main() {
358433"pnpm test:docker:e2e-build",
359434baseEnv,
360435);
436+await prepareBundledChannelPackage(baseEnv, logDir);
361437362438const options = { failFast, startStaggerMs: laneStartStaggerMs, timeoutMs: laneTimeoutMs };
363439const failures = await runLanePool(lanes, baseEnv, logDir, parallelism, options);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。