#!/data/data/com.termux/files/usr/bin/bash # Runs the headless GDScript gameplay tests from Termux, via the Godot # 4.7.1 Linux arm64 build installed inside the proot-distro Ubuntu container. # Usage: bash tests/run_tests.sh set -e PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" GODOT_BIN="/root/Godot_v4.7.1-stable_linux.arm64" status=0 for test_script in "$PROJECT_DIR"/tests/test_*.gd; do name="$(basename "$test_script")" echo "=== Running $name ===" if ! proot-distro login ubuntu -- bash -c "cd '$PROJECT_DIR' && '$GODOT_BIN' --headless -s res://tests/$name"; then status=1 fi echo done exit $status