diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-03 18:06:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-03 18:12:55 +0300 |
commit | df05163715bd33dfe7a50d1f68f0ed997b281923 (patch) | |
tree | 82df4e4791d05a1b06bb7d090ac391cb5936080e | |
parent | ee1e885da332d6103d1228bf21fedff762f84139 (diff) | |
download | hercules-df05163715bd33dfe7a50d1f68f0ed997b281923.tar.gz hercules-df05163715bd33dfe7a50d1f68f0ed997b281923.tar.bz2 hercules-df05163715bd33dfe7a50d1f68f0ed997b281923.tar.xz hercules-df05163715bd33dfe7a50d1f68f0ed997b281923.zip |
Run all servers in travis check.
-rwxr-xr-x | travis.sh | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -44,6 +44,23 @@ function aborterror { exit 1 } +function run_server { + $1 --run-once $2 2>runlog.txt + export errcode=$? + export teststr=$(cat runlog.txt) + if [[ -n "${teststr}" ]]; then + echo "Errors found in running server $1." + cat runlog.txt + aborterror "Errors found in running server $1." + else + echo "No errors found for server $1." + fi + if [ ${errcode} -ne 0 ]; then + echo "server $1 terminated with exit code ${errcode}" + aborterror "Test failed" + fi +} + case "$MODE" in createdb|importdb|test) DBNAME="$1" @@ -112,20 +129,9 @@ EOF ARGS="--load-script npc/dev/test.txt " ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt" echo "Running Hercules with command line: ./map-server --run-once $ARGS" - ./map-server --run-once $ARGS 2>runlog.txt - export errcode=$? - export teststr=$(cat runlog.txt) - if [[ -n "${teststr}" ]]; then - echo "Sanitizer errors found." - cat runlog.txt - aborterror "Sanitize errors found." - else - echo "No sanitizer errors found." - fi - if [ ${errcode} -ne 0 ]; then - echo "server terminated with exit code ${errcode}" - aborterror "Test failed" - fi + run_server ./login-server + run_server ./char-server + run_server ./map-server "$ARGS" ;; getplugins) echo "Cloning plugins repository..." |