summaryrefslogtreecommitdiff
path: root/travis.sh
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-07-03 19:47:38 +0200
committerGitHub <noreply@github.com>2016-07-03 19:47:38 +0200
commitd2f666fc10eac20f70729176c088b2c81d233531 (patch)
tree55902d4e252f365f511137d4022670ccfad59a62 /travis.sh
parent6fbc00f9454d33caf79f89708cab9e46ec996eeb (diff)
parent7b350fbf497d737c12cc03ddd888bb6a0ee486e4 (diff)
downloadhercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.gz
hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.bz2
hercules-d2f666fc10eac20f70729176c088b2c81d233531.tar.xz
hercules-d2f666fc10eac20f70729176c088b2c81d233531.zip
Merge pull request #1336 from 4144/travisext
Different travis extensions
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh34
1 files changed, 20 insertions, 14 deletions
diff --git a/travis.sh b/travis.sh
index b1f639935..646532374 100755
--- a/travis.sh
+++ b/travis.sh
@@ -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..."