Implement playable Mac client and rendering validation

This commit is contained in:
shen
2026-09-11 14:58:22 +08:00
parent 1ab68bd06e
commit 374d4165d8
233 changed files with 6546 additions and 284 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# INF-02 negative/positive checks. Uses only static fixtures and a temporary
# output directory; it never starts the game or contacts the server.
set -euo pipefail
cd "$(dirname "$0")/.."
tmp_dir="$(mktemp -d "${TMPDIR:-/tmp}/mt-playable-gate.XXXXXX")"
trap 'rm -R "$tmp_dir"' EXIT
node script/validate_playable_report.mjs \
--report test/playable/report.valid.json \
--output "$tmp_dir/valid.json" \
--log test/playable/clean.log --process-code 0 --require-pass
if node script/validate_playable_report.mjs \
--report test/playable/report.blocked.json \
--output "$tmp_dir/blocked.json" \
--log test/playable/clean.log --process-code 0 --require-pass; then
echo "FAIL: BLOCKED fixture was accepted" >&2
exit 1
fi
if node script/validate_playable_report.mjs \
--report test/playable/report.valid.json \
--output "$tmp_dir/exit.json" \
--log test/playable/clean.log --process-code 1 --require-pass; then
echo "FAIL: non-zero child exit was accepted" >&2
exit 1
fi
if node script/validate_playable_report.mjs \
--report test/playable/report.valid.json \
--output "$tmp_dir/rid.json" \
--log test/playable/rid-warning.log --process-code 0 --require-pass; then
echo "FAIL: renderer warning was accepted" >&2
exit 1
fi
if MT_PLAYABLE_VALIDATE_CONFIG="$PWD/test/playable/scenario.example.json" \
godot --headless --path project --script playable_config_gate.gd; then
echo "FAIL: empty scenario configuration was accepted" >&2
exit 1
fi
echo "playable_gate_test: PASS"