diff options
author | Haru <haru@dotalux.com> | 2016-11-19 18:02:56 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-11-19 21:08:14 +0100 |
commit | 187e8853c503142dedebb9c5210ed9ef7992d679 (patch) | |
tree | fd6e8c47b35379099ce9ce60041ae2de8bee102e /tools/ci | |
parent | 7f5a6bf8af26dc815e8c913c4917b419af86b85b (diff) | |
download | hercules-187e8853c503142dedebb9c5210ed9ef7992d679.tar.gz hercules-187e8853c503142dedebb9c5210ed9ef7992d679.tar.bz2 hercules-187e8853c503142dedebb9c5210ed9ef7992d679.tar.xz hercules-187e8853c503142dedebb9c5210ed9ef7992d679.zip |
Let the CI test suite also run the tests
For the time being, test_libconfig only (test_spinlock is very time
consuming)
Diffstat (limited to 'tools/ci')
-rwxr-xr-x | tools/ci/travis.sh | 22 |
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 |