Explicit extern "sysv64" and "win64" (and their -unwind forms) follow rustc's x86_64 conventions, with rustc's E0570 on other targets. A quit is clean at any time (signal, window close, remote quit, during boot); the boot window moves, resizes and closes while the app boots, and a boot probe reports stalls. `makepad check --boundary` audits every provided crate the loader binds: JIT code reaches makepad-hal, script, shader and Linux capture state only through #[relax_api] ops. Domains keep their package names and threads; constants are copied per domain through their pointer words; a read binding owns its snapshot on the reading thread. Android: zone arenas reserve 8 GB, inspect shows thread stacks, opening an app from the phone WM no longer hangs. Windows: the source watcher ends at quit and the boot window's shaders compile for D3D11. Tests that build or drop a JIT unit run alone in a child process. The load screen follows the WM's dark/light live, has a close button and drags from anywhere. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
32 lines
2.1 KiB
Bash
Executable file
32 lines
2.1 KiB
Bash
Executable file
#!/bin/zsh
|
|
# Regression test: the run window answers while the app boots. On a cold cache, the boot probe
|
|
# (MAKEPAD_RUN_BOOT_PROBE, tools/run/src/boot_probe.rs) presses, drags and releases on the window's
|
|
# caption every 8 ms and resizes it every 256 ms until the app's first frame. Every caption press
|
|
# must get its drag answer (the window moves only by it), and no event may wait, no turn of the
|
|
# window pump may take and no frame of the loading screen may lag more than MAX_MS (default 50);
|
|
# nor may the main thread (MAKEPAD_HAL_MAIN_LAG, the window system's thread) stay away that long.
|
|
# WINDOWED=1 runs in a real window (Linux: under a private headless weston, WAYLAND_DISPLAY set).
|
|
# Run from the workspace root after `cargo build --release -p makepad-run`; PACKAGE defaults to
|
|
# makepad-example-counter.
|
|
max=${MAX_MS:-50}
|
|
dir=$(mktemp -d)
|
|
# the automation script ends the run once the app has presented
|
|
printf 'wait_frame 1\n' > $dir/quit.hal
|
|
hidden=(MAKEPAD_HAL_BACKEND=offscreen MAKEPAD_HIDE_WINDOWS=1)
|
|
[ -n "$WINDOWED" ] && hidden=()
|
|
out=$(env $hidden SANDBOX_MUTE=1 MAKEPAD_RUN_CACHE_DIR=$dir/cache MAKEPAD_RUN_BOOT_PROBE=1 MAKEPAD_HAL_MAIN_LAG=1 \
|
|
MAKEPAD_HAL_SCRIPT=$dir/quit.hal perl -e 'alarm 420; exec @ARGV' target/release/makepad run ${PACKAGE:-makepad-example-counter} 2>&1)
|
|
line=$(echo "$out" | grep "makepad-run boot-probe:" | tail -1)
|
|
main=$(echo "$out" | grep "makepad-hal: main-lag" | tail -1)
|
|
echo "$line"
|
|
echo "$main"
|
|
# (an offscreen run on Linux has no window-system thread: no main-lag line)
|
|
[ -z "$main" ] || echo "$main" | awk -v max=$max '{
|
|
for (i = 1; i <= NF; i++) { split($i, kv, "="); v[kv[1]] = kv[2] }
|
|
exit (v["ticks"] > 0 && v["max_ms"] < max) ? 0 : 1
|
|
}' || { echo "boot_responsive: FAILED (main thread)"; exit 1; }
|
|
echo "$line" | awk -v max=$max '{
|
|
for (i = 1; i <= NF; i++) { split($i, kv, "="); v[kv[1]] = kv[2] }
|
|
ok = v["drag_queries"] > 0 && v["event_max_ms"] < max && v["turn_max_ms"] < max && v["frame_max_ms"] < max && v["stalls"] == 0
|
|
exit ok ? 0 : 1
|
|
}' && echo "boot_responsive: ok" || { echo "boot_responsive: FAILED"; exit 1; }
|