refactor: collapse dual-mode plumbing — the DOM port is the only WASM build
The canvas (wxUniversal) mode is gone (wxwidgets submodule); remove every piece of side-by-side plumbing so there is exactly one build and one test flow: - scripts/build-wxuniversal-wasm.sh -> scripts/build-wx-wasm.sh; no --dom/--enable-universal; builds into build-wasm/wxwidgets - build-wasm-test.sh: no DOM_BUILD / apps-dom rsync mirror / PORT=dom; apps build straight into tests/apps (Makefile.wasm PORT conditionals collapsed; wx.js + wx-dom.js always pre-js) - docker/build.sh, build-kicad-target.sh, env.sh: WX_PORT / -dom / -universal suffixes removed; kicad builds to kicad-<app>, outputs to output/; wx.js/wx-dom.js copied from the real source path (/workspace/wxwidgets/build/wasm — the old build-wasm path never existed and silently failed) - setup-kicad-wasm.sh: single target dir; the perl wx-dom.js injection is gone — the 7 checked-in kicad pages now reference wx-dom.js directly - playwright configs serve apps/; fixtures drop the test-results/dom and logs/wxwidgets/dom namespacing; boot.spec asserts wxDomPort unconditionally; pcbnew.spec uses one reference image; appearance.spec assertions unconditional - compare/update-baseline-screenshots.sh: --port removed - tests/gal-regression/wasm/Makefile: links build-wasm/wxwidgets and carries wx-dom.js as a second pre-js — the gal-webgl suite (30 specs) now actually builds and runs here (it needed host-side boost+glm via scripts/deps; the bundle had been missing, timing the whole spec out) - tests: clickCanvas() dispatches via page.mouse (DOM widgets legitimately cover the canvas; locator actionability refused the click); the comprehensive spec drives wxChoice through its native <select> (browser-owned popup cannot be coordinate-clicked) - docs: README/CLAUDE.md/build.md script names and dirs; features/wx-dom-port README reframed (DOM is THE port), visual-notes bugs 26-28; FindwxWidgets.cmake config label drops 'wasmuniv' - wxwidgets submodule -> 9dbacc9448 (DOM-only port, fork diff shrunk) Gate: full wx e2e suite 292 passed / 1 skipped / 0 failed — first run ever with the gal-webgl specs green (28 scenarios + load + sequential). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
2c1b0d409b
commit
7dc1bf27e0
32 changed files with 199 additions and 335 deletions
|
|
@ -10,7 +10,6 @@ source "$(dirname "$0")/common/env.sh"
|
|||
# ./build-wasm-test.sh # Incremental build (default)
|
||||
# ./build-wasm-test.sh --clean # Clean build from scratch
|
||||
# ./build-wasm-test.sh --debug # Build with debug symbols
|
||||
# ./build-wasm-test.sh --dom # Build against the DOM port into tests/apps-dom
|
||||
# ./build-wasm-test.sh menu # Build only the menu test
|
||||
# ./build-wasm-test.sh --debug menu # Build menu test with debug symbols
|
||||
|
||||
|
|
@ -18,7 +17,6 @@ set -e
|
|||
|
||||
DEBUG_BUILD=0
|
||||
CLEAN_BUILD=0
|
||||
DOM_BUILD=0
|
||||
TARGET=""
|
||||
|
||||
# Parse arguments
|
||||
|
|
@ -27,8 +25,6 @@ for arg in "$@"; do
|
|||
DEBUG_BUILD=1
|
||||
elif [ "$arg" = "--clean" ]; then
|
||||
CLEAN_BUILD=1
|
||||
elif [ "$arg" = "--dom" ]; then
|
||||
DOM_BUILD=1
|
||||
elif [ "$arg" != "" ]; then
|
||||
TARGET="$arg"
|
||||
fi
|
||||
|
|
@ -38,29 +34,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
TESTS_DIR="$PROJECT_ROOT/tests"
|
||||
|
||||
if [ "$DOM_BUILD" = "1" ]; then
|
||||
BUILD_DIR="$PROJECT_ROOT/build-wasm/wxwidgets-dom"
|
||||
# DOM apps build in a mirrored source tree so canvas and DOM bundles
|
||||
# coexist; relative ../../ paths in Makefile.wasm resolve identically.
|
||||
WASM_APP_DIR="$TESTS_DIR/apps-dom"
|
||||
echo "Mirroring test app sources into apps-dom..."
|
||||
# kicad/ is excluded: apps-dom/kicad is owned by
|
||||
# tests/scripts/setup-kicad-wasm.sh (DOM bundles + injected pages) and
|
||||
# apps/kicad only has the checked-in HTML — mirroring with --delete
|
||||
# would wipe the synced multi-hundred-MB kicad artifacts.
|
||||
rsync -a --delete \
|
||||
--exclude 'kicad/' \
|
||||
--exclude '*.o' --exclude '*.d' \
|
||||
--exclude '*_test.html' --exclude '*_test.js' --exclude '*_test.wasm' \
|
||||
--exclude '*_repro.html' --exclude '*_repro.js' --exclude '*_repro.wasm' \
|
||||
--exclude '*.wasm.map' \
|
||||
"$TESTS_DIR/apps/" "$WASM_APP_DIR/"
|
||||
MAKE_PORT_ARGS="PORT=dom"
|
||||
else
|
||||
BUILD_DIR="$PROJECT_ROOT/build-wasm/wxwidgets-universal"
|
||||
WASM_APP_DIR="$TESTS_DIR/apps"
|
||||
MAKE_PORT_ARGS=""
|
||||
fi
|
||||
BUILD_DIR="$PROJECT_ROOT/build-wasm/wxwidgets"
|
||||
WASM_APP_DIR="$TESTS_DIR/apps"
|
||||
STANDALONE_DIR="$WASM_APP_DIR/standalone"
|
||||
|
||||
echo "=== Building wxWidgets WASM Test Applications ==="
|
||||
|
|
@ -80,7 +55,7 @@ echo "Test app dir: $WASM_APP_DIR"
|
|||
|
||||
# Verify wxWidgets is built
|
||||
if [ ! -f "$BUILD_DIR/wx-config" ]; then
|
||||
echo "ERROR: wxWidgets not built. Run build-wxuniversal-wasm.sh first"
|
||||
echo "ERROR: wxWidgets not built. Run build-wx-wasm.sh first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -120,9 +95,9 @@ fi
|
|||
# Build (pass DEBUG flag if requested). App links are independent, so honor
|
||||
# JOBS/PARALLEL_JOBS from env.sh (each emcc link is slow due to Asyncify).
|
||||
if [ "$DEBUG_BUILD" = "1" ]; then
|
||||
make -j"${JOBS:-1}" -f Makefile.wasm DEBUG=1 $MAKE_PORT_ARGS "$MAKE_TARGET"
|
||||
make -j"${JOBS:-1}" -f Makefile.wasm DEBUG=1 "$MAKE_TARGET"
|
||||
else
|
||||
make -j"${JOBS:-1}" -f Makefile.wasm $MAKE_PORT_ARGS "$MAKE_TARGET"
|
||||
make -j"${JOBS:-1}" -f Makefile.wasm "$MAKE_TARGET"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue