mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(test): make max Vitest scripts Windows-safe
This commit is contained in:
@@ -12,6 +12,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Installer: install Node.js through `apk` on Alpine Linux instead of falling through to the NodeSource package-manager path.
|
||||
- Installer: detect musl Linux shells such as Alpine as Linux instead of rejecting them before npm install.
|
||||
- Control UI: split large build-time runtime dependencies into stable chunks so Linux/Docker install and package builds stay below the app chunk warning threshold.
|
||||
- Tests: run `test:max` and `test:changed:max` through a Node wrapper so high-worker Vitest entrypoints work on native Windows.
|
||||
- Tests: retry transient loopback HTTP resets in the kitchen-sink RPC walk so native Windows readiness probes do not fail after the gateway is already ready.
|
||||
- Tests: run `test:serial` through a Node wrapper so targeted serial Vitest commands work on native Windows.
|
||||
- Tests: normalize Vitest config path assertions so the infra config suite runs on native Windows paths.
|
||||
|
||||
@@ -1613,7 +1613,7 @@
|
||||
"test:build:status-message-runtime": "node scripts/test-built-status-message-runtime.mjs",
|
||||
"test:bundled": "node scripts/run-vitest.mjs run --config test/vitest/vitest.bundled.config.ts",
|
||||
"test:changed": "node scripts/test-projects.mjs --changed origin/main",
|
||||
"test:changed:max": "OPENCLAW_VITEST_MAX_WORKERS=8 node scripts/test-projects.mjs --changed origin/main",
|
||||
"test:changed:max": "node scripts/test-projects-max.mjs --changed origin/main",
|
||||
"test:channels": "node scripts/run-vitest.mjs run --config test/vitest/vitest.channels.config.ts",
|
||||
"test:contracts": "pnpm test:contracts:channels && pnpm test:contracts:plugins",
|
||||
"test:contracts:channels": "node scripts/test-projects.mjs --maxWorkers=1 test/vitest/vitest.contracts-channel-surface.config.ts test/vitest/vitest.contracts-channel-config.config.ts test/vitest/vitest.contracts-channel-registry.config.ts test/vitest/vitest.contracts-channel-session.config.ts",
|
||||
@@ -1729,7 +1729,7 @@
|
||||
"test:live:media:video": "node --import tsx scripts/test-live-media.ts video",
|
||||
"test:live:models-profiles": "node scripts/test-live.mjs -- src/agents/models.profiles.live.test.ts",
|
||||
"test:macos:ci": "node scripts/test-projects.mjs src/daemon/launchd.test.ts src/daemon/runtime-paths.test.ts src/daemon/runtime-binary.test.ts src/infra/brew.test.ts src/infra/stable-node-path.test.ts test/scripts/vitest-process-group.test.ts",
|
||||
"test:max": "OPENCLAW_VITEST_MAX_WORKERS=8 node scripts/test-projects.mjs",
|
||||
"test:max": "node scripts/test-projects-max.mjs",
|
||||
"test:parallels:linux": "bash scripts/e2e/parallels-linux-smoke.sh",
|
||||
"test:parallels:macos": "bash scripts/e2e/parallels-macos-smoke.sh",
|
||||
"test:parallels:npm-update": "bash scripts/e2e/parallels-npm-update-smoke.sh",
|
||||
|
||||
3
scripts/test-projects-max.mjs
Normal file
3
scripts/test-projects-max.mjs
Normal file
@@ -0,0 +1,3 @@
|
||||
process.env.OPENCLAW_VITEST_MAX_WORKERS = "8";
|
||||
|
||||
await import("./test-projects.mjs");
|
||||
@@ -230,6 +230,10 @@ describe("test scripts", () => {
|
||||
};
|
||||
|
||||
expect(pkg.scripts?.["test:serial"]).toBe("node scripts/test-projects-serial.mjs");
|
||||
expect(pkg.scripts?.["test:max"]).toBe("node scripts/test-projects-max.mjs");
|
||||
expect(pkg.scripts?.["test:changed:max"]).toBe(
|
||||
"node scripts/test-projects-max.mjs --changed origin/main",
|
||||
);
|
||||
expect(pkg.scripts?.["test:fast"]).toBe(
|
||||
"node scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user