7b6a141767
Move the 40-odd root-level scripts and scenes into a tree that groups by role,
per the approved roadmap (WS2/WS3): actors/{player,matador,bear}, systems/{combat,
fx,input,debug,render,crowd,config}, ui/, props/ (was tscn_s/). Rename the shell
scene.tscn -> levels/game_shell.tscn and every PascalCase scene to snake_case
(Player.tscn -> player.tscn, MainMenu.tscn -> main_menu.tscn, etc.) so the
case-insensitive web/macOS filesystems can't alias two files together.
Done as a scripted move: each file travels with its .uid; every quoted res:// path
across scenes, scripts, .tres, and project.godot's 9 autoloads is rewritten; the
.godot uid/class cache is rebuilt from scratch. Scenes still resolve by uid, so the
rewrite is belt-and-suspenders. Lint globs (run_tests.sh + both CI workflows) now
walk the new dirs; an orphan animation_tree.gd.uid and 7 pre-existing trailing-
whitespace lints (barrel/torch, never covered by the old root-only glob) are cleaned.
Full suite green on both sides. Asset consolidation (Assets/Animations/fonts ->
art/) is deferred — moving imported .glb/.png/.ttf is safer done in the editor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KoYBYQgRyY1zDHXMsXY3V
66 lines
2.0 KiB
Bash
Executable File
66 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Run all project tests. Exit code 0 = all passed.
|
|
# Usage: bash run_tests.sh [--no-gameplay]
|
|
set -euo pipefail
|
|
|
|
GODOT="${GODOT:-godot}"
|
|
SKIP_GAMEPLAY=0
|
|
for arg in "$@"; do [[ "$arg" == "--no-gameplay" ]] && SKIP_GAMEPLAY=1; done
|
|
|
|
echo "=== gdlint ==="
|
|
gdlint actors systems ui props levels tests
|
|
|
|
echo ""
|
|
echo "=== Harness self-test (shared test_helpers: seeded RNG + approx + tally) ==="
|
|
"$GODOT" --headless --script tests/harness_selftest.gd
|
|
|
|
echo ""
|
|
echo "=== Logic tests ==="
|
|
"$GODOT" --headless --script tests/logic_test.gd
|
|
|
|
echo ""
|
|
echo "=== Damage pipeline (bull's hit reception through DamageEvent) ==="
|
|
"$GODOT" --headless --script tests/damage_pipeline_test.gd
|
|
|
|
echo ""
|
|
echo "=== FX gallery smoke (every registered Fx effect spawns + frees) ==="
|
|
"$GODOT" --headless --script tests/fx_gallery_test.gd
|
|
|
|
echo ""
|
|
echo "=== Console focus tests ==="
|
|
"$GODOT" --headless --script tests/console_focus_test.gd
|
|
|
|
echo ""
|
|
echo "=== Level switch tests (no cross-level geometry/collider leaks) ==="
|
|
"$GODOT" --headless --script tests/level_switch_test.gd
|
|
|
|
echo ""
|
|
echo "=== Touch control tests (joystick self-heals, never strands) ==="
|
|
"$GODOT" --headless --script tests/touch_controls_test.gd
|
|
|
|
echo ""
|
|
echo "=== UI layout tests (HUD stays on-screen, text fits, tap targets, scroll — across resolutions) ==="
|
|
"$GODOT" --headless --script tests/ui_layout_test.gd
|
|
|
|
echo ""
|
|
echo "=== Rigid-skin tests (web mesh conversion keeps all materials) ==="
|
|
"$GODOT" --headless --script tests/rigid_skin_test.gd
|
|
|
|
echo ""
|
|
echo "=== Performance tests (frame-budget regression guard) ==="
|
|
"$GODOT" --headless --script tests/performance_test.gd
|
|
|
|
echo ""
|
|
echo "=== Ragdoll perf (on-hit spike breakdown: build / sim-start / burst / mass hit) ==="
|
|
"$GODOT" --headless --script tests/ragdoll_perf_test.gd
|
|
|
|
if [[ "$SKIP_GAMEPLAY" -eq 0 ]]; then
|
|
echo ""
|
|
echo "=== Gameplay tests (headless — assertions only, screenshots may be blank) ==="
|
|
"$GODOT" --headless --script tests/gameplay_test.gd
|
|
echo "Frame strip: tests/output/gameplay/"
|
|
fi
|
|
|
|
echo ""
|
|
echo "=== All tests passed ==="
|