The layer-key order was adopted from two measured screens and then applied to every build on the disc, so it owed a regression check against the screens the corpus had already validated against the running game. Rendered the tutorial PAUSE menu and the title main menu both ways and diffed: 3.8 % and 1.1 % of pixels differ, max delta 45/255 and 34/255, and the two renders are indistinguishable in layout — the change is confined to blends where translucent sprites overlap. No regression, but which order is more faithful on those two screens is unsettled and recorded as such. Adds a corpus-wide test asserting every composite's draw list is strictly increasing in (layer key, declaration index), streaming one pak at a time so it does not OOM alongside the other whole-disc tests. It reports the rule's reach: 341 of 965 builds are reordered, and it fails if that share collapses.
68 lines
2.9 KiB
Bash
Executable File
68 lines
2.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Boot -> title -> main menu -> TUTORIAL, and report where it lands.
|
|
#
|
|
# The point is a runtime capture of a SECOND capital ship (the per-class
|
|
# generalisation in BACKLOG). The ship capture itself is in the current build —
|
|
# F10 arms it — so what is being tested here is only whether a mission is
|
|
# reachable, given that (A) at the title takes about half the time.
|
|
set -u
|
|
export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98
|
|
SD="$(cd "$(dirname "$0")" && pwd)"
|
|
OUT="${1:-/sylph-home/re/tutorial}"
|
|
mkdir -p "$OUT"
|
|
shot(){ screenshot "$1" >/dev/null 2>&1; }
|
|
screen(){ shot /tmp/tl.png; python3 "$SD/screen_id.py" /tmp/tl.png | awk '{print $1}'; }
|
|
alive(){ ps -o pid=,stat= -C xenia_canary 2>/dev/null | awk '$2 !~ /^Z/ {print $1}'; }
|
|
|
|
# (A) at the title is accepted on roughly half of boots and nothing observable
|
|
# predicts which (docs/re/canary-scripted-input-traps.md), so retry the whole
|
|
# boot rather than the press: pressing again on the same title never works.
|
|
for attempt in $(seq 1 "${ATTEMPTS:-4}"); do
|
|
echo "=== attempt $attempt"
|
|
pkill -9 -x xenia_canary 2>/dev/null; sleep 3
|
|
( cd "$OUT" && nohup run-canary --mem_watch=false ${EXTRA_FLAGS:-} \
|
|
--logged_profile_slot_0_xuid=B13EBABEBABEBABE \
|
|
>"$OUT/canary.stdout" 2>&1 & )
|
|
sleep 8
|
|
until xdotool search --name "Xenia-canary" >/dev/null 2>&1; do
|
|
[ -n "$(alive)" ] || { echo "EMULATOR GONE"; exit 4; }; sleep 1
|
|
done
|
|
|
|
deadline=$(( SECONDS + 400 ))
|
|
s=""
|
|
while [ $SECONDS -lt $deadline ]; do
|
|
s="$(screen)"; [ "$s" = "title" ] && break; sleep 2
|
|
done
|
|
[ "$s" = "title" ] || { echo "NO TITLE this attempt"; continue; }
|
|
echo "title at ${SECONDS}s -> A"
|
|
python3 "$SD/pad.py" tap A 0.3
|
|
for _ in 1 2 3 4 5 6 7 8; do sleep 3; s="$(screen)"; [ "$s" = "menu" ] && break; done
|
|
shot "$OUT/menu.png"
|
|
if [ "$s" != "menu" ]; then
|
|
echo "NO MENU (screen=$s) — (A) not accepted; rebooting"
|
|
continue
|
|
fi
|
|
|
|
echo "menu reached; two d-pad steps down to TUTORIAL, then A"
|
|
python3 "$SD/pad.py" dpad down 0.08; sleep 1.2
|
|
python3 "$SD/pad.py" dpad down 0.08; sleep 1.2
|
|
shot "$OUT/menu-on-tutorial.png"
|
|
python3 "$SD/pad.py" tap A 0.3
|
|
|
|
# TUTORIAL leads to DIFFICULTY (A picks NORMAL) and then SELECT DATA, where the
|
|
# cache-flush crash fires. Keep pressing A through those and report what happens,
|
|
# with the crash count, because "did it survive the throw" is the question.
|
|
for i in $(seq 1 20); do
|
|
sleep 8; s="$(screen)"
|
|
shot "$OUT/after-$(printf '%02d' "$i").png"
|
|
crashes=$(grep -c "CRASH DUMP" "$OUT/canary.stdout" 2>/dev/null || echo 0)
|
|
echo " t+$((i*8))s $s crashes=$crashes"
|
|
case $i in 2|5|9) echo " -> A"; python3 "$SD/pad.py" tap A 0.3 ;; esac
|
|
[ "$s" = "flight" ] && [ "$crashes" = "0" ] && { echo "IN FLIGHT"; break; }
|
|
done
|
|
echo "final crash dumps: $(grep -c 'CRASH DUMP' "$OUT/canary.stdout" 2>/dev/null || echo 0)"
|
|
echo "TUTORIAL LAUNCH ATTEMPT DONE (emulator left running)"
|
|
exit 0
|
|
done
|
|
echo "GAVE UP after ${ATTEMPTS:-4} boots"
|