Add a repeatable screenshot capture and compare smoke
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.
This commit is contained in:
1 parent
b39fee6176
commit
d96f53c285
6 files changed
+159
-171
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/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
|
||||
Reference in new issue
Block a user