diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/HPMHookGen/HPMHookGen.pl | 3 | ||||
-rwxr-xr-x | tools/ci/travis.sh | 22 |
2 files changed, 23 insertions, 2 deletions
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index 3203e0b70..b8835b376 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -295,6 +295,7 @@ foreach my $file (@files) { # Loop through the xml files my $loc = $data->{compounddef}->{$filekey}->{location}->[0]; next unless $loc->{file} =~ /src\/(map|char|login|common)\//; next if $loc->{file} =~ /\/HPM.*\.h/; # Don't allow hooking into the HPM itself + next if $loc->{file} =~ /\/memmgr\.h/; # Don't allow hooking into the memory manager my $servertype = $1; my $key = $data->{compounddef}->{$filekey}->{compoundname}->[0]; my $original = $key; @@ -338,8 +339,6 @@ foreach my $file (@files) { # Loop through the xml files $key = "chr"; } elsif ($key eq "db_interface") { $key = "DB"; - } elsif ($key eq "malloc_interface") { - $key = "iMalloc"; } elsif ($key eq "socket_interface") { $key = "sockt"; } elsif ($key eq "sql_interface") { 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 |