fix: harden S4 audio verification
This commit is contained in:
+12
-1
@@ -5,4 +5,15 @@ if [[ ! -x "$GODOT_BIN" ]]; then
|
||||
GODOT_BIN="$(command -v godot4 || command -v godot || true)"
|
||||
fi
|
||||
: "${GODOT_BIN:?Set GODOT_BIN or install godot4/godot}"
|
||||
exec "$GODOT_BIN" --headless --path . -s res://addons/gut/gut_cmdln.gd -gdir=res://tests/unit -gexit
|
||||
|
||||
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/unit -gexit 2>&1 | tee "$log_path"
|
||||
godot_status=${PIPESTATUS[0]}
|
||||
set -e
|
||||
if grep -Eq 'SCRIPT ERROR|Parse Error' "$log_path"; then
|
||||
echo "unit tests failed: Godot reported a script or parse error" >&2
|
||||
exit 1
|
||||
fi
|
||||
exit "$godot_status"
|
||||
|
||||
Reference in New Issue
Block a user