fix(test): make import timing scripts Windows-safe · openclaw/openclaw@8ae9977
vincentkoc
·
2026-05-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,6 +11,7 @@ Docs: https://docs.openclaw.ai
|
11 | 11 | - Scripts: use `git grep` to prefilter tracked conflict-marker scans so changed checks avoid reading every repository file on clean runs. |
12 | 12 | - Installer: install Node.js through `apk` on Alpine Linux instead of falling through to the NodeSource package-manager path. |
13 | 13 | - Installer: detect musl Linux shells such as Alpine as Linux instead of rejecting them before npm install. |
| 14 | +- Tests: run Vitest import timing entrypoints through a Node wrapper so native Windows package scripts can collect import diagnostics. |
14 | 15 | - 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. |
15 | 16 | - Tests: run `test:max` and `test:changed:max` through a Node wrapper so high-worker Vitest entrypoints work on native Windows. |
16 | 17 | - 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. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1739,8 +1739,8 @@
|
1739 | 1739 | "test:perf:groups": "node scripts/test-group-report.mjs", |
1740 | 1740 | "test:perf:groups:compare": "node scripts/test-group-report.mjs --compare", |
1741 | 1741 | "test:perf:hotspots": "node scripts/test-hotspots.mjs", |
1742 | | -"test:perf:imports": "OPENCLAW_VITEST_IMPORT_DURATIONS=1 OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1 node scripts/test-projects.mjs", |
1743 | | -"test:perf:imports:changed": "OPENCLAW_VITEST_IMPORT_DURATIONS=1 OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1 node scripts/test-projects.mjs --changed origin/main", |
| 1742 | +"test:perf:imports": "node scripts/test-projects-imports.mjs", |
| 1743 | +"test:perf:imports:changed": "node scripts/test-projects-imports.mjs --changed origin/main", |
1744 | 1744 | "test:perf:profile:main": "node scripts/run-vitest-profile.mjs main", |
1745 | 1745 | "test:perf:profile:runner": "node scripts/run-vitest-profile.mjs runner", |
1746 | 1746 | "test:plugins:gateway-gauntlet": "node scripts/check-plugin-gateway-gauntlet.mjs", |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +process.env.OPENCLAW_VITEST_IMPORT_DURATIONS = "1"; |
| 2 | +process.env.OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN = "1"; |
| 3 | + |
| 4 | +await import("./test-projects.mjs"); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -234,6 +234,12 @@ describe("test scripts", () => {
|
234 | 234 | expect(pkg.scripts?.["test:changed:max"]).toBe( |
235 | 235 | "node scripts/test-projects-max.mjs --changed origin/main", |
236 | 236 | ); |
| 237 | +expect(pkg.scripts?.["test:perf:imports"]).toBe( |
| 238 | +"node scripts/test-projects-imports.mjs", |
| 239 | +); |
| 240 | +expect(pkg.scripts?.["test:perf:imports:changed"]).toBe( |
| 241 | +"node scripts/test-projects-imports.mjs --changed origin/main", |
| 242 | +); |
237 | 243 | expect(pkg.scripts?.["test:fast"]).toBe( |
238 | 244 | "node scripts/run-vitest.mjs run --config test/vitest/vitest.unit.config.ts", |
239 | 245 | ); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。