CardFrame draws the user's frame_corner/frame_border art around each card, tiling the bead strip so it fits any size; a small shader recolours the art to the theme's trim (or the card's own colour). Themes choose the border (Tarot: beaded, Felt: plain). Cards (RollTable.color) and threads (TableEntry.pipe_color, JSON "color") can have their own colour from the inspector's Colour row (presets, Theme, or any colour). tools/run_tests.sh imports first and prints at most 8 lines per failing suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.2 KiB
Bash
Executable file
34 lines
1.2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Runs every headless suite in parallel and prints one line per suite.
|
|
# A suite fails if it doesn't print "PASS: 0 failure(s)" or if its output has
|
|
# a SCRIPT ERROR (a crashed test function can still print PASS).
|
|
# Usage: tools/run_tests.sh [name-filter] e.g. tools/run_tests.sh inspector
|
|
# Failing suites print their first 8 error lines; passing output is discarded.
|
|
set -u
|
|
cd "$(dirname "$0")/.."
|
|
GODOT="${GODOT:-$HOME/apps/Godot_v4.7.2-stable_linux.x86_64}"
|
|
OUT="$(mktemp -d)"
|
|
trap 'rm -rf "$OUT"' EXIT
|
|
suites=(tests/test_*${1:-}*.gd)
|
|
# Register any new class_name scripts first (cheap when nothing changed).
|
|
"$GODOT" --headless --path . --import >/dev/null 2>&1
|
|
for t in "${suites[@]}"; do
|
|
n="$(basename "$t" .gd)"
|
|
( timeout 300 "$GODOT" --headless --path . -s "res://$t" -- --sample >"$OUT/$n.log" 2>&1 ) &
|
|
while (( $(jobs -rp | wc -l) >= ${JOBS:-8} )); do wait -n; done
|
|
done
|
|
wait
|
|
fail=0
|
|
for t in "${suites[@]}"; do
|
|
n="$(basename "$t" .gd)"
|
|
log="$OUT/$n.log"
|
|
if grep -q "PASS: 0 failure(s)" "$log" && ! grep -q "SCRIPT ERROR" "$log"; then
|
|
echo "ok $n"
|
|
else
|
|
echo "FAIL $n"
|
|
grep -E "FAIL|SCRIPT ERROR|ERROR" "$log" | head -8
|
|
fail=1
|
|
fi
|
|
done
|
|
(( fail )) && echo "SOME SUITES FAILED" || echo "ALL ${#suites[@]} SUITES PASSED"
|
|
exit $fail
|