Files
BT411/scratchpad/night6/mp4_stress.sh
T

38 lines
1.4 KiB
Bash

#!/usr/bin/env bash
# #81 FOUR-NODE STRESS TEST of the ghost-mech fix + the KILLS/DEATHS scoreboard.
#
# Four networked instances, ALL dying repeatedly on staggered timers so death
# cycles overlap (the field condition: several respawn handshakes in flight at
# once, each answered by an arbitrary peer's DropZone).
#
# PASS = every death cycle pairs START -> RESET on its own node
# 0 SWALLOWED / 0 MISMATCH / 0 DISCARDED / 0 GHOST / 0 crash
# and each node's PLAYER_DEAD tally increments 1 per death.
set -x
cd /c/git/bt411/content || exit 1
rm -f mp4_a.log mp4_b.log mp4_c.log mp4_d.log
A=/c/git/bt411/scratchpad/night6/runs/$(date +%H%M%S); mkdir -p "$A"; mv matchlog_*.txt "$A"/ 2>/dev/null
# staggered first deaths so the cycles interleave instead of lining up
launch () { # $1=log $2=affinity $3=port $4=delay
BT_LOG=$1 BT_AFFINITY=$2 BT_MP_LOG=1 BT_SCORE_LOG=1 BT_DEATH_LOG=1 BT_MATCHLOG=1 \
BT_SELF_DAMAGE=60 BT_SELF_DAMAGE_DELAY=$4 BT_SELF_DAMAGE_REPEAT=1 \
../build/Release/btl4.exe -egg MP4.EGG -net $3 &
}
launch mp4_d.log 0x8 1801 34
sleep 1
launch mp4_c.log 0x4 1701 41
sleep 1
launch mp4_b.log 0x2 1601 48
sleep 1
launch mp4_a.log 0x1 1501 55
sleep 5
python ../tools/btconsole.py MP4.EGG 127.0.0.1:1501 127.0.0.1:1601 \
127.0.0.1:1701 127.0.0.1:1801 &
PC=$!
sleep 210
kill $PC 2>/dev/null
taskkill //F //IM btl4.exe 2>/dev/null
echo "=== DONE ==="