The three heavy 3D-viewer specs (3d-viewer, 3d-viewer-deadlock, 3d-viewer-models)
crashed on CI (run 28604015154): "Target crashed", "browser has been closed", and a
black frozen canvas. Each boots the 3D-enabled pcbnew build, which pre-warms
~hardwareConcurrency*2+8 (~68 on the 30-core VM) Web Workers AND runs a multi-threaded
CPU raytracer over SwiftShader software-WebGL. Under fullyParallel the three spec FILES
run in separate browser processes concurrently, and the simultaneous raytrace tabs
exhaust the shared GPU process's ~16 live-WebGL-context limit / renderer memory. The
pool pre-warm (the deadlock fix, 7630c7e) is correct and present in the tested binary;
per-file isolation prevented in-process Worker accumulation but NOT this cross-process
concurrency — the gap these specs' first CI exposure hit.
Fix (test-orchestration only; no wasm/submodule changes):
- Route the three specs to a dedicated `chromium-ci-3d` Playwright project (own
outputDir=pw-artifacts/kicad-3d so its failure traces survive the later perf run's
wipe; the existing tests/pw-artifacts/** upload already captures it).
- test:kicad:ci runs it as a SECOND `playwright test` pass with --workers=1, so at most
one raytrace tab is alive at a time (the environment in which a single 3D load is
reliably green — docs/features/3d-raytracer/README.md §7). An exit-code-aggregating
sequencer runs both phases and fails if either fails (no silent skip of the 3D pass).
- Cap phase-1 CI workers to 12 as headroom under the WebGL-context cap.
- Log a resource-diagnostic snapshot (hardwareConcurrency, pthread pool, GL-canvas
count, wasm/JS heap) before each 3D interaction so any recurrence is attributable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
72 lines
5.9 KiB
JSON
72 lines
5.9 KiB
JSON
{
|
|
"name": "kicad-wasm-tests",
|
|
"version": "1.0.0",
|
|
"description": "Playwright tests for wxWidgets WASM and KiCad",
|
|
"scripts": {
|
|
"test": "npm run test:wx && npm run test:asyncify:firefox",
|
|
"test:wx": "playwright test",
|
|
"test:ui": "playwright test --ui",
|
|
"test:headed": "playwright test --headed",
|
|
"build-wasm": "cd apps && make -f Makefile.wasm",
|
|
"build:collab": "node collab/build.mjs",
|
|
"serve": "npx serve apps -p 8080 -c ../serve.json",
|
|
"setup:kicad": "./scripts/setup-kicad-wasm.sh",
|
|
"test:web": "npm run setup:kicad && playwright test --config=playwright-web.config.ts --project=firefox",
|
|
"test:web:headed": "npm run setup:kicad && playwright test --config=playwright-web.config.ts --project=chromium --headed",
|
|
"test:kicad:firefox": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=firefox",
|
|
"test:kicad:chrome": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=chromium --headed",
|
|
"test:kicad": "npm run test:kicad:firefox",
|
|
"test:kicad:ci": "npm run setup:kicad && sh -c 'playwright test --config=playwright-kicad.config.ts --project=firefox --project=chromium-ci; a=$?; playwright test --config=playwright-kicad.config.ts --project=chromium-ci-3d --workers=1; b=$?; exit $((a||b))'",
|
|
"test:kicad:headed": "npm run test:kicad:chrome",
|
|
"test:perf": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=perf --workers=1",
|
|
"test:pcbnew:firefox": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=firefox kicad/pcbnew.spec.ts",
|
|
"test:pcbnew:chrome": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=chromium --headed kicad/pcbnew.spec.ts",
|
|
"test:eeschema:firefox": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=firefox kicad/eeschema.spec.ts",
|
|
"test:eeschema:chrome": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=chromium --headed kicad/eeschema.spec.ts",
|
|
"test:eeschema": "npm run test:eeschema:firefox",
|
|
"test:eeschema:headed": "npm run test:eeschema:chrome",
|
|
"test:calculator:firefox": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=firefox kicad/calculator.spec.ts",
|
|
"test:calculator:chrome": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=chromium --headed kicad/calculator.spec.ts",
|
|
"test:calculator": "npm run test:calculator:firefox",
|
|
"test:calculator:headed": "npm run test:calculator:chrome",
|
|
"test:symbol_editor:firefox": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=firefox kicad/symbol_editor.spec.ts",
|
|
"test:symbol_editor:chrome": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=chromium --headed kicad/symbol_editor.spec.ts",
|
|
"test:symbol_editor": "npm run test:symbol_editor:firefox",
|
|
"test:symbol_editor:headed": "npm run test:symbol_editor:chrome",
|
|
"test:gerbview:firefox": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=firefox kicad/gerbview.spec.ts",
|
|
"test:gerbview:chrome": "npm run setup:kicad && playwright test --config=playwright-kicad.config.ts --project=chromium --headed kicad/gerbview.spec.ts",
|
|
"test:gerbview": "npm run test:gerbview:firefox",
|
|
"test:gerbview:headed": "npm run test:gerbview:chrome",
|
|
"test:coroutine:firefox": "playwright test --config=playwright-coroutine.config.ts --project=firefox",
|
|
"test:coroutine:chrome": "playwright test --config=playwright-coroutine.config.ts --project=chromium --headed",
|
|
"test:asyncify:firefox": "playwright test --config=playwright-asyncify.config.ts --project=firefox",
|
|
"test:asyncify:chrome": "playwright test --config=playwright-asyncify.config.ts --project=chromium --headed",
|
|
"test:asyncify:safari": "playwright test --config=playwright-asyncify.config.ts --project=webkit",
|
|
"test:asyncify:all": "npm run test:asyncify:firefox && npm run test:asyncify:safari && npm run test:asyncify:chrome",
|
|
"screenshots:check": "tsx tools/screenshots/compare.ts",
|
|
"screenshots:promote": "tsx tools/screenshots/promote.ts",
|
|
"screenshots:noise": "tsx tools/screenshots/noise.ts",
|
|
"screenshots:report": "tsx tools/screenshots/post-discord.ts",
|
|
"screenshots:changelog": "tsx tools/screenshots/changelog.ts",
|
|
"screenshots:manifest": "tsx tools/screenshots/gen-manifest.ts",
|
|
"3d:compare": "tsx tools/screenshots/compare-dirs.ts",
|
|
"3d:check": "tsx tools/screenshots/compare-dirs.ts --old 3d-regression/baseline --new 3d-regression/output/native --out 3d-regression/output/diff/native-self --floors 3d-regression/floors.json --level native-self --label 3d-native --fail-on-change",
|
|
"3d:check:webgl": "tsx tools/screenshots/compare-dirs.ts --old 3d-regression/baseline-webgl --new 3d-regression/output/webgl --out 3d-regression/output/diff/webgl-self --floors 3d-regression/floors.json --level webgl-self --label 3d-webgl --fail-on-change",
|
|
"3d:check:parity": "tsx tools/screenshots/compare-dirs.ts --old 3d-regression/baseline --new 3d-regression/output/webgl --out 3d-regression/output/diff/parity --floors 3d-regression/floors.json --level webgl-vs-native --label 3d-parity",
|
|
"3d:review": "tsx tools/screenshots/compare-dirs.ts --old 3d-regression/baseline --new 3d-regression/output/webgl --out 3d-regression/output/diff/parity-review --floors 3d-regression/floors.json --level webgl-vs-native --label 3d-parity --artifacts always",
|
|
"3d:test:webgl": "playwright test e2e/3d-webgl.spec.ts"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.40.0",
|
|
"@types/node": "^24.10.1",
|
|
"@types/pixelmatch": "^5.2.6",
|
|
"@types/pngjs": "^6.0.5",
|
|
"esbuild": "^0.28.0",
|
|
"pixelmatch": "^5.3.0",
|
|
"pngjs": "^7.0.0",
|
|
"serve": "^14.2.0",
|
|
"tsx": "^4.22.4",
|
|
"typescript": "^5.9.3",
|
|
"yjs": "^13.6.31"
|
|
}
|
|
}
|