Adds tools/gen_sideb.py — one data-driven builder replacing the copy-pasted gen_missionN.py pattern — and tools/smoketest.sh, which reports PASS/FAIL/DISPLAY_UNAVAILABLE instead of the process-is-alive check that has produced false passes twice now. NOT verified in-game: the display went to sleep mid-session. Static checks all pass (luac, check-yaml 0 errors, map refresh, check_assets, make) and the already-verified m03 hangs identically, confirming it is environmental. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
51 lines
1.6 KiB
Bash
Executable File
51 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
# Launch a map and report honestly. Three distinct outcomes — never conflate them:
|
|
# PASS reached gameplay, no exceptions
|
|
# FAIL crashed / lua fatal (real bug, output shown)
|
|
# DISPLAY_UNAVAILABLE hung at mod load: OpenRA is SDL/OpenGL only, so a
|
|
# locked or sleeping screen stalls it forever. The process
|
|
# stays ALIVE, which is why "is it still running?" is a
|
|
# worthless check and this script exists.
|
|
#
|
|
# usage: tools/smoketest.sh <mapname> [seconds]
|
|
set -u
|
|
MAP="${1:-arena}"
|
|
WAIT="${2:-90}"
|
|
DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
OUT="$(mktemp -t vg_smoke)"
|
|
|
|
export PATH="/opt/homebrew/opt/dotnet@8/bin:$PATH"
|
|
export DOTNET_ROLL_FORWARD=LatestMajor
|
|
|
|
cd "$DIR" || exit 2
|
|
./launch-game.sh Game.Mod=vinylgod "Launch.Map=$MAP" > "$OUT" 2>&1 &
|
|
|
|
i=0
|
|
while [ "$i" -lt "$WAIT" ]; do
|
|
sleep 3
|
|
i=$((i + 3))
|
|
if grep -qi "Fatal Lua\|Exception of type" "$OUT"; then
|
|
echo "FAIL $MAP"
|
|
grep -iE "Fatal Lua|Exception of type" "$OUT" | head -3
|
|
pkill -f OpenRA.dll
|
|
exit 1
|
|
fi
|
|
if grep -q "Game started" "$OUT"; then
|
|
sleep 15
|
|
if grep -qi "Fatal Lua\|Exception of type" "$OUT"; then
|
|
echo "FAIL $MAP (crashed after start)"
|
|
grep -iE "Fatal Lua|Exception of type" "$OUT" | head -3
|
|
pkill -f OpenRA.dll
|
|
exit 1
|
|
fi
|
|
echo "PASS $MAP (reached gameplay, clean for 15s)"
|
|
pkill -f OpenRA.dll
|
|
exit 0
|
|
fi
|
|
done
|
|
|
|
pkill -f OpenRA.dll
|
|
echo "DISPLAY_UNAVAILABLE $MAP (never reached gameplay in ${WAIT}s, no crash)"
|
|
echo " -> wake the screen and re-run; this is NOT a pass and NOT a code failure"
|
|
exit 3
|