summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-11-20 01:00:45 +0300
committerGitHub <noreply@github.com>2016-11-20 01:00:45 +0300
commit511219ae00986d41586f99421fef2126325f1e15 (patch)
treefd6e8c47b35379099ce9ce60041ae2de8bee102e /tools
parent20b44f8fcaff75657386783c2696ca9dc2cbc7d6 (diff)
parent187e8853c503142dedebb9c5210ed9ef7992d679 (diff)
downloadhercules-511219ae00986d41586f99421fef2126325f1e15.tar.gz
hercules-511219ae00986d41586f99421fef2126325f1e15.tar.bz2
hercules-511219ae00986d41586f99421fef2126325f1e15.tar.xz
hercules-511219ae00986d41586f99421fef2126325f1e15.zip
Merge pull request #1517 from HerculesWS/libconfig-quickupdate
Libconfig quickupdate
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/travis.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh
index db1ea5315..9a6322df6 100755
--- a/tools/ci/travis.sh
+++ b/tools/ci/travis.sh
@@ -62,6 +62,24 @@ function run_server {
fi
}
+function run_test {
+ echo "Running: test_$1"
+ ./test_$1 2>runlog.txt
+ export errcode=$?
+ export teststr=$(cat runlog.txt)
+ if [[ -n "${teststr}" ]]; then
+ echo "Errors found in running test $1."
+ cat runlog.txt
+ aborterror "Errors found in running test $1."
+ else
+ echo "No errors found for test $1."
+ fi
+ if [ ${errcode} -ne 0 ]; then
+ echo "test $1 terminated with exit code ${errcode}"
+ aborterror "Test failed"
+ fi
+}
+
# Defaults
DBNAME=ragnarok
DBUSER=ragnarok
@@ -105,6 +123,7 @@ case "$MODE" in
make -j3 || aborterror "Build failed."
make plugins -j3 || aborterror "Build failed."
make plugin.script_mapquit -j3 || aborterror "Build failed."
+ make test || aborterror "Build failed."
;;
test)
cat > conf/travis_sql_connection.conf << EOF
@@ -153,6 +172,9 @@ EOF
ARGS="--load-script npc/dev/test.txt "
ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
PLUGINS="--load-plugin HPMHooking --load-plugin sample"
+ echo "run tests"
+ # run_test spinlock # Not running the spinlock test for the time being (too time consuming)
+ run_test libconfig
echo "run all servers without HPM"
run_server ./login-server
run_server ./char-server