Files
security-game/tools/check_screenshots.sh
zwitschi c1cd4898e8
Full build / Import + headless tests (push) Successful in 36s
Full build / Full desktop build + optional release (push) Skipped
Close the 0.9.3 UI polish milestone
Add deterministic captures 14-21 for the remaining screen-design states, fix the panel/button layout issues they exposed, and record 21/21 compare and judge results. Bump the source to 0.9.3 and move the completed milestone to DONE.md.
2026-11-02 17:57:40 +01:00

24 lines
946 B
Bash
Executable File

#!/usr/bin/env bash
# Repeatable visual-regression smoke: render the staged captures into
# docs/screenshots and compare them against the runtime reference art.
#
# Runs under Xvfb automatically when no display is available. Requires Godot
# 4.3 on PATH (or GODOT=...), Python 3, Pillow, and xvfb-run for headless hosts.
set -euo pipefail
cd "$(dirname "$0")/.."
GODOT="${GODOT:-godot}"
RUN=()
if [[ -z "${DISPLAY:-}" ]]; then
if ! command -v xvfb-run >/dev/null 2>&1; then
echo "error: no DISPLAY and xvfb-run is not installed" >&2
exit 2
fi
RUN=(xvfb-run -a)
fi
"${RUN[@]}" "$GODOT" --path . --script res://src/test/capture_screenshots.gd -- --out=res://docs/screenshots
"${RUN[@]}" "$GODOT" --path . --script res://src/test/capture_ui_states.gd -- --out=res://docs/screenshots
"${RUN[@]}" "$GODOT" --path . --script res://src/test/capture_prop_gallery.gd -- --out=res://docs/screenshots
python3 tools/screen_designs.py compare