travis, wml test: incorporate fabi's --noaddons mode as an option

It's not necessary since travis has no add-ons but I put it there
anyways as an example to how others should run the mainline tests.
This commit is contained in:
Chris Beck 2014-11-05 21:01:58 -05:00
parent ca0674d684
commit d2b7af8711
2 changed files with 12 additions and 2 deletions

View file

@ -63,7 +63,7 @@ script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- if [ "$CPP_TESTS" = true ]; then time ./test; fi # The test executor script seems to be blocking stderr, disabling for now... time ./utils/travis/test_executor.sh; fi
- if [ "$WML_TESTS" = true ]; then time ./run_wml_tests -g -v -t "$WML_TEST_TIME"; fi
- if [ "$WML_TESTS" = true ]; then time ./run_wml_tests -g -v -c -t "$WML_TEST_TIME"; fi
- if [ "$PLAY_TEST" = true ]; then time ./utils/travis/play_test_executor.sh; fi
after_failure:

View file

@ -11,6 +11,7 @@ usage()
echo -e "\t-h\tShows this help."
echo -e "\t-v\tVerbose mode."
echo -e "\t-w\tVery verbose mode. (Debug script.)"
echo -e "\t-c\tClean mode. (Don't load any add-ons. Used for mainline tests.)"
echo -e "\t-a arg\tAdditional arguments to go to wesnoth."
echo -e "\t-t arg\tNew timer value to use, instead of 10s as default."
echo -e "\t-s\tDisable strict mode. By default, we run wesnoth with option"
@ -154,6 +155,11 @@ run_test()
opts+="--log-strict=warning "
fi
# If running clean mode, then pass "--noaddons"
if [ "$CleanMode" -eq 1 ]; then
opts+="--noaddons "
fi
# Assemble command
command="$preopts"
command+="$binary"
@ -187,6 +193,7 @@ run_test()
Verbose=0
UnixTimeout=0
CleanMode=0
LoadFile="wml_test_schedule"
BinPath="./"
StrictMode=1
@ -195,7 +202,7 @@ GdbBacktraceMode=0
extra_opts=""
basetimer=10
while getopts ":hvwusdgp:l:a:t:" Option
while getopts ":hvwcusdgp:l:a:t:" Option
do
case $Option in
h )
@ -212,6 +219,9 @@ do
Verbose=2
fi
;;
c )
CleanMode=1
;;
u )
UnixTimeout=1
;;