Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qtscript: Add new function changePlayerColour()
Also added initial script for automated testing.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
rm -rf tmp | ||
mkdir -p tmp | ||
|
||
trap ctrl_c INT | ||
|
||
function ctrl_c() { | ||
echo " * Caught ctrl+c - aborting!" | ||
exit 1 | ||
} | ||
|
||
function run | ||
{ | ||
echo | ||
echo " -- $2 --" | ||
echo | ||
gdb -q --ex run --ex quit --args src/warzone2100 --window --configdir=tmp --resolution=1024x768 --shadows --sound --texturecompression $1 | ||
} | ||
|
||
function cam | ||
{ | ||
echo | ||
echo " ==== $2 ====" | ||
run "--game=$1 --saveandquit=savegames/campaign/$1.gam" "Initial run" | ||
run "--loadcampaign=$1 --saveandquit=savegames/campaign/$1-loadsave.gam" "Loadsave run" | ||
} | ||
|
||
echo | ||
echo "Running Warzone2100 automated tests" | ||
echo -n "Time is: " | ||
date -R | ||
|
||
cam CAM_1A "Alpha campaign" | ||
cam CAM_2A "Beta campaign" | ||
cam CAM_3A "Gamma campaign" | ||
cam TUTORIAL3 "Tutorial" | ||
cam FASTPLAY "Fastplay" |