diff options
-rw-r--r-- | .travis.yml | 47 | ||||
-rw-r--r-- | doc/constants.md | 2 | ||||
-rw-r--r-- | doc/script_commands.txt | 4 | ||||
-rw-r--r-- | src/map/script.c | 2 | ||||
-rwxr-xr-x | tools/ci/travis.sh | 8 |
5 files changed, 61 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index a9bea834d..b29668da3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ install: before_script: - uname -a + - ulimit -c unlimited -S - ./tools/ci/travis.sh createdb ragnarok root - ./tools/ci/travis.sh importdb ragnarok root - ./tools/ci/travis.sh adduser ragnarok travis travis root @@ -44,6 +45,7 @@ matrix: sources: - ubuntu-toolchain-r-test packages: + - gdb - gcc-6 - doxygen - libxml-simple-perl @@ -57,6 +59,7 @@ matrix: - llvm-toolchain-trusty-5.0 - ubuntu-toolchain-r-test packages: + - gdb - clang-5.0 - compiler: clang env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --disable-renewal --enable-Werror --enable-buildbot" @@ -66,6 +69,7 @@ matrix: - llvm-toolchain-trusty-5.0 - ubuntu-toolchain-r-test packages: + - gdb - clang-5.0 - compiler: clang env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20190123 --enable-packetver-re --enable-buildbot" @@ -75,6 +79,7 @@ matrix: - llvm-toolchain-trusty-4.0 - ubuntu-toolchain-r-test packages: + - gdb - clang-4.0 - compiler: clang env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20130724 --enable-packetver-re --enable-buildbot" @@ -84,6 +89,7 @@ matrix: - llvm-toolchain-trusty-4.0 - ubuntu-toolchain-r-test packages: + - gdb - clang-4.0 - compiler: clang env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --disable-renewal --enable-Werror --enable-buildbot" @@ -93,6 +99,7 @@ matrix: - llvm-toolchain-trusty-4.0 - ubuntu-toolchain-r-test packages: + - gdb - clang-4.0 - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-buildbot" @@ -109,6 +116,7 @@ matrix: sources: - ubuntu-toolchain-r-test packages: + - gdb - gcc-5 - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" @@ -117,6 +125,7 @@ matrix: sources: - ubuntu-toolchain-r-test packages: + - gdb - gcc-5 - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20190123 --enable-packetver-re --enable-buildbot" @@ -125,6 +134,7 @@ matrix: sources: - ubuntu-toolchain-r-test packages: + - gdb - gcc-6 - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" @@ -133,7 +143,44 @@ matrix: sources: - ubuntu-toolchain-r-test packages: + - gdb - gcc-6 + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20190123 --enable-packetver-re --enable-buildbot" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gdb + - gcc-7 + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-7 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gdb + - gcc-7 + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20190123 --enable-packetver-re --enable-buildbot" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gdb + - gcc-8 + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gdb + - gcc-8 notifications: email: false diff --git a/doc/constants.md b/doc/constants.md index 8b3acbfdf..69bb51ea4 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -3991,6 +3991,8 @@ - `MAX_REFINE`: 20 - `MAX_MENU_OPTIONS`: 255 - `MAX_MENU_LENGTH`: 2048 +- `MOB_CLONE_START`: 4001 +- `MOB_CLONE_END`: 5000 ### status options diff --git a/doc/script_commands.txt b/doc/script_commands.txt index c3cc8a799..55f5a9fe7 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -718,6 +718,8 @@ MAX_CHAT_USERS - Maximum Chat users MAX_REFINE - Maximum Refine level MAX_MENU_OPTIONS - Maximum NPC menu options MAX_MENU_LENGTH - Maximum NPC menu string length +MOB_CLONE_START - Clone ID start from this range +MOB_CLONE_END - Clone ID end with this range Send targets and status options are also hard-coded and can be found in 'doc/constants.md'. @@ -6332,7 +6334,7 @@ Examples: setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL, true); // Re-enables attack, skills and item use - setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM, false); + setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM, false); // checkpcblock related checks if ((checkpcblock() & PCBLOCK_IMMUNE) != 0) diff --git a/src/map/script.c b/src/map/script.c index 7e6e06376..24cb8e4f4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -25845,6 +25845,8 @@ static void script_hardcoded_constants(void) script->set_constant("MAX_REFINE",MAX_REFINE,false, false); script->set_constant("MAX_MENU_OPTIONS", MAX_MENU_OPTIONS, false, false); script->set_constant("MAX_MENU_LENGTH", MAX_MENU_LENGTH, false, false); + script->set_constant("MOB_CLONE_START", MOB_CLONE_START, false, false); + script->set_constant("MOB_CLONE_END", MOB_CLONE_END, false, false); script->constdb_comment("status options"); script->set_constant("Option_Nothing",OPTION_NOTHING,false, false); diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index fa7d5be93..22f523bdf 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -47,7 +47,8 @@ function aborterror { function run_server { echo "Running: $1 --run-once $2" - $1 --run-once $2 2>runlog.txt + rm -rf core* || true + CRASH_PLEASE=1 $1 --run-once $2 2>runlog.txt export errcode=$? export teststr=$(head -c 10000 runlog.txt) if [[ -n "${teststr}" ]]; then @@ -59,12 +60,17 @@ function run_server { fi if [ ${errcode} -ne 0 ]; then echo "server $1 terminated with exit code ${errcode}" + COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) + if [[ -f "$COREFILE" ]]; then + gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch + fi aborterror "Test failed" fi } function run_test { echo "Running: test_$1" + sysctl -w kernel.core_pattern=core || true ./test_$1 2>runlog.txt export errcode=$? export teststr=$(head -c 10000 runlog.txt) |