20 lines
608 B
Bash
Executable File
20 lines
608 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
GODOT_BIN="${GODOT_BIN:-/snap/bin/godot4}"
|
|
if [[ ! -x "$GODOT_BIN" ]]; then
|
|
GODOT_BIN="$(command -v godot4 || command -v godot || true)"
|
|
fi
|
|
: "${GODOT_BIN:?Set GODOT_BIN or install godot4/godot}"
|
|
|
|
log_path="$(mktemp)"
|
|
trap 'rm -f "$log_path"' EXIT
|
|
set +e
|
|
"$GODOT_BIN" --headless --path . -s res://addons/gut/gut_cmdln.gd -gdir=res://tests/e2e -gexit 2>&1 | tee "$log_path"
|
|
godot_status=${PIPESTATUS[0]}
|
|
set -e
|
|
if grep -Eq 'SCRIPT ERROR|Parse Error' "$log_path"; then
|
|
echo "E2E tests failed: Godot reported a script or parse error" >&2
|
|
exit 1
|
|
fi
|
|
exit "$godot_status"
|