Both capture helpers now accept --out=res://docs/screenshots, and tools/check_screenshots.sh renders the staged set (using xvfb-run when headless) before running screen_designs.py compare. Record the judge result: 7 match, 4 review, 0 diff. Headless 226/226 and the smoke both pass in a clean worktree.
23 lines
839 B
Bash
Executable File
23 lines
839 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_prop_gallery.gd -- --out=res://docs/screenshots
|
|
python3 tools/screen_designs.py compare
|