Implement playable Mac client and rendering validation
This commit is contained in:
Executable
+44
@@ -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"
|
||||
Reference in New Issue
Block a user