Commit graph pcbjam/scripts/build-wasm-test.sh
Author SHA1 Message Date
Viktor Vaczi
ad5c4f6772 Fix pthread deadlock by using dynamic PTHREAD_POOL_SIZE
The KiCad WASM build was freezing during initialization due to a pthread
deadlock. When hardware_concurrency() > PTHREAD_POOL_SIZE, new Web Worker
creation requires the event loop, but the main thread busy-waits blocking it.

Changes:
- Use navigator.hardwareConcurrency for PTHREAD_POOL_SIZE in KiCad build
- Add threadpool test to reproduce and verify the fix
- Add single-target build support to build-wasm-test.sh
- Default docker/build.sh to -j 10 for faster builds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 11:47:50 +01:00
Viktor Vaczi
67f5a88a34 Fix wxGrid test crash and add debug build support
The wxGrid test was crashing with "memory access out of bounds" due to
an initialization order bug in grid_test.cpp: during CreateGrid(), wxGrid
fires cell selection events which triggered the OnGridCellSelect handler
that called m_log->AppendText() before m_log was initialized.

Fix: Add null check in LogEvent() to guard against events firing before
m_log is created.

Also adds --debug flag to build-wasm-test.sh for debugging WASM crashes:
- Builds with DWARF symbols (-g) and source maps (-gsource-map)
- No optimization (-O0) preserves debugging context
- Stack traces show actual function names instead of wasm-function[N]

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:15:56 +01:00
Viktor Vaczi
53e4603a41 Add standalone test apps and Playwright specs for wxWidgets WASM
- Add 10 standalone test apps for isolated component testing:
  - menu, toolbar, layout, aui, clipboard, filedialog, grid
  - dialog, timer, tree (3 new)
- Add 12 Playwright e2e test specs for automated testing
- Update Makefile with GL/non-GL build configurations
- Update build script to list all standalone tests
- Add WHATWORKS.md documenting KiCad wxWidgets coverage
- Update .gitignore for build artifacts

Test results:
- 79 Playwright tests pass
- wxGrid crashes (memory access out of bounds)
- wxTreeCtrl crashes (similar issue)
- wxDialog/wxMessageBox events fire but no visual popup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:19:13 +01:00
Viktor Vaczi
3f67fed173 Add Playwright test infrastructure for wxWidgets WASM port
- Add tests/ directory with Playwright e2e tests
- Add minimal wxWidgets WASM test application
- Add build script for test app (scripts/build-wasm-test.sh)
- Update wxWidgets submodule with WASM build fixes
- Update .gitignore for test artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 13:10:05 +01:00