mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
37 lines
1.5 KiB
Bash
Executable File
37 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$root_dir"
|
|
|
|
logs_dir="$(mktemp -d "${TMPDIR:-/tmp}/cosmic-clash-phase6.XXXXXX")"
|
|
cleanup() {
|
|
docker compose -f compose.phase6-smoke.yml down --volumes --remove-orphans >"$logs_dir/compose-down.log" 2>&1 || true
|
|
echo "Phase 6 logs: $logs_dir"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
docker build --target exporter -t cosmic-clash-phase6-exporter .
|
|
docker run --rm cosmic-clash-phase6-exporter bash -lc 'godot --headless --path Game --import && godot --headless --path Game res://tests/test_runner.tscn'
|
|
docker compose -f compose.phase6-smoke.yml up --build -d
|
|
docker compose -f compose.phase6-smoke.yml wait client-one client-two server
|
|
docker compose -f compose.phase6-smoke.yml logs --no-color >"$logs_dir/compose.log"
|
|
cat "$logs_dir/compose.log"
|
|
|
|
if grep -E "(SCRIPT ERROR|ERROR:|EXPORT SMOKE FAIL)" "$logs_dir/compose.log"; then
|
|
echo "Phase 6 verification found engine or smoke errors" >&2
|
|
exit 1
|
|
fi
|
|
for name in ExportSmokeOne ExportSmokeTwo; do
|
|
grep -q "EXPORT SMOKE PASS: $name" "$logs_dir/compose.log"
|
|
done
|
|
test "$(grep -c "smoke_goal_forced" "$logs_dir/compose.log")" -eq 2
|
|
grep -q "server_draining" "$logs_dir/compose.log"
|
|
arena_lines="$(grep "match_starting" "$logs_dir/compose.log" | sed -n 's/.*arena=\([^ ]*\).*/\1/p')"
|
|
first_arena="$(printf '%s\n' "$arena_lines" | sed -n '1p')"
|
|
second_arena="$(printf '%s\n' "$arena_lines" | sed -n '2p')"
|
|
test -n "$first_arena"
|
|
test -n "$second_arena"
|
|
test "$first_arena" != "$second_arena"
|
|
echo "Phase 6 Docker verification passed"
|