replay test bash script (tested, works on mac)
This commit is contained in:
66
test/replays.sh
Executable file
66
test/replays.sh
Executable file
@@ -0,0 +1,66 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Call this script from the repository root:
|
||||
# ./test/replays.sh <no_fail_fast: optional> <thoroughness: default 1>
|
||||
|
||||
# examples:
|
||||
# ./test/replays.sh no_fail_fast 1
|
||||
# ./test/replays.sh 0
|
||||
|
||||
# thoroughness values (these can add huge wait times):
|
||||
# 0: short
|
||||
# 1: short + long
|
||||
|
||||
# Use Git Bash on Windows.
|
||||
|
||||
# Only scons builds are supported
|
||||
|
||||
fail_fast="true"
|
||||
thoroughness=0
|
||||
if [ "$1" = "no_fail_fast" ]; then
|
||||
fail_fast="false"
|
||||
thoroughness="${2:-1}"
|
||||
else
|
||||
thoroughness="${1:-1}"
|
||||
fi
|
||||
|
||||
status=$(git diff-index --quiet HEAD -- && echo "clean" || echo "modified")
|
||||
# TODO don't update success if the repo is modified
|
||||
|
||||
EXE_DIR="build/Blades of Exile"
|
||||
EXE="Blades of Exile"
|
||||
PLATFORM=""
|
||||
|
||||
if [ "$(uname)" = "Linux" ]; then
|
||||
PLATFORM="linux"
|
||||
elif [ "$(uname)" = "Darwin" ]; then
|
||||
PLATFORM="mac"
|
||||
EXE_DIR="${EXE_DIR}/Blades of Exile.app/Contents/MacOS"
|
||||
# Git Bash on Windows gives a more complicated, probably unreliable answer for $(uname)
|
||||
else
|
||||
PLATFORM="windows"
|
||||
EXE="${EXE}.exe"
|
||||
fi
|
||||
|
||||
if [ ! -f "$EXE_DIR/$EXE" ]; then
|
||||
echo "Build Blades of Exile with Scons first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function test_folder() {
|
||||
folder="$(pwd)/test/replays/$1"
|
||||
replays="$folder"/*.xml
|
||||
for replay in $replays; do
|
||||
(cd "$EXE_DIR" && "./$EXE" --replay "$replay") || echo "Replay failed: $replay" && [ "$fail_fast" = "true" ] && exit 1
|
||||
done
|
||||
}
|
||||
|
||||
case $thoroughness in
|
||||
0)
|
||||
test_folder short
|
||||
;;
|
||||
1)
|
||||
test_folder short
|
||||
test_folder long
|
||||
;;
|
||||
esac
|
||||
22
test/replays/long/Placeholder.xml
Normal file
22
test/replays/long/Placeholder.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<actions SHA="47b4456" Tag="v0.0.4" Status="modified" Repo="git@github.com:NQNStudios/cboe.git">
|
||||
<load_prefs>
|
||||
<![CDATA[DisplayMode = 5
|
||||
DrawTerrainAnimation = true
|
||||
DrawTerrainFrills = false
|
||||
DrawTerrainShoreFrills = true
|
||||
EasyMode = false
|
||||
GameRunBefore = true
|
||||
GameSpeed = 0
|
||||
GiveIntroHint = false
|
||||
LessWanderingMonsters = false
|
||||
PlaySounds = true
|
||||
ReceivedHelp = [22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 54 0 47 65 36 37 48 49 62 0 5 6 7 8 33 0 26 27 56 0 10 11 9 0 57 0 50 0 12 0 25 0 20 21 20 21 20 21 9 0 68 69 31 0]
|
||||
RepeatRoomDescriptions = false
|
||||
ShowInstantHelp = true
|
||||
UIScale = 1.5
|
||||
UIScaleMap = 1.5
|
||||
]]>
|
||||
</load_prefs>
|
||||
<srand>1727292559</srand>
|
||||
<close_window></close_window>
|
||||
</actions>
|
||||
65
test/replays/short/Issue455.xml
Normal file
65
test/replays/short/Issue455.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<actions SHA="47b4456" Tag="v0.0.4" Status="modified" Repo="git@github.com:NQNStudios/cboe.git">
|
||||
<load_prefs>
|
||||
<![CDATA[DisplayMode = 5
|
||||
DrawTerrainAnimation = true
|
||||
DrawTerrainFrills = false
|
||||
DrawTerrainShoreFrills = true
|
||||
EasyMode = false
|
||||
GameRunBefore = true
|
||||
GameSpeed = 0
|
||||
GiveIntroHint = false
|
||||
LessWanderingMonsters = false
|
||||
PlaySounds = true
|
||||
ReceivedHelp = [22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 54 0 47 65 36 37 48 49 62 0 5 6 7 8 33 0 26 27 56 0 10 11 9 0 57 0 50 0 12 0 25 0 20 21 20 21 20 21 9 0 68 69 31 0]
|
||||
RepeatRoomDescriptions = false
|
||||
ShowInstantHelp = true
|
||||
UIScale = 1.5
|
||||
UIScaleMap = 1.5
|
||||
]]>
|
||||
</load_prefs>
|
||||
<srand>1727292388</srand>
|
||||
<startup_button_click>
|
||||
<btn>3</btn>
|
||||
<mods>1</mods>
|
||||
</startup_button_click>
|
||||
<build_scen_headers>AnimatedTile.boes
Boundary Test.boes
Boundary Test 2.boes
Display Picture.boes
myscenario.boes
thrakos.exs
recttown.exs
</build_scen_headers>
|
||||
<control_click>
|
||||
<id>list</id>
|
||||
<mods>1</mods>
|
||||
</control_click>
|
||||
<control_click>
|
||||
<id>scen1</id>
|
||||
<mods>1</mods>
|
||||
</control_click>
|
||||
<control_click>
|
||||
<id>btn1</id>
|
||||
<mods>0</mods>
|
||||
</control_click>
|
||||
<move>(8,8)</move>
|
||||
<move>(9,7)</move>
|
||||
<move>(10,7)</move>
|
||||
<move>(11,7)</move>
|
||||
<control_click>
|
||||
<id>done</id>
|
||||
<mods>0</mods>
|
||||
</control_click>
|
||||
<move>(11,7)</move>
|
||||
<move>(12,8)</move>
|
||||
<move>(12,9)</move>
|
||||
<move>(12,10)</move>
|
||||
<move>(11,11)</move>
|
||||
<move>(11,11)</move>
|
||||
<handle_begin_talk></handle_begin_talk>
|
||||
<handle_talk>(9,11)</handle_talk>
|
||||
<click_talk_rect>
|
||||
<node>-16</node>
|
||||
<preset>true</preset>
|
||||
<rect>{(4,343) - (134,363)}</rect>
|
||||
<word>Ask About...</word>
|
||||
</click_talk_rect>
|
||||
<field_focus>response</field_focus>
|
||||
<control_click>
|
||||
<id>okay</id>
|
||||
<mods>0</mods>
|
||||
</control_click>
|
||||
</actions>
|
||||
22
test/replays/short/Placeholder.xml
Normal file
22
test/replays/short/Placeholder.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<actions SHA="47b4456" Tag="v0.0.4" Status="modified" Repo="git@github.com:NQNStudios/cboe.git">
|
||||
<load_prefs>
|
||||
<![CDATA[DisplayMode = 5
|
||||
DrawTerrainAnimation = true
|
||||
DrawTerrainFrills = false
|
||||
DrawTerrainShoreFrills = true
|
||||
EasyMode = false
|
||||
GameRunBefore = true
|
||||
GameSpeed = 0
|
||||
GiveIntroHint = false
|
||||
LessWanderingMonsters = false
|
||||
PlaySounds = true
|
||||
ReceivedHelp = [22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 22 23 1 2 55 0 54 0 47 65 36 37 48 49 62 0 5 6 7 8 33 0 26 27 56 0 10 11 9 0 57 0 50 0 12 0 25 0 20 21 20 21 20 21 9 0 68 69 31 0]
|
||||
RepeatRoomDescriptions = false
|
||||
ShowInstantHelp = true
|
||||
UIScale = 1.5
|
||||
UIScaleMap = 1.5
|
||||
]]>
|
||||
</load_prefs>
|
||||
<srand>1727292559</srand>
|
||||
<close_window></close_window>
|
||||
</actions>
|
||||
Reference in New Issue
Block a user