From: Mario Date: Wed, 15 Jul 2020 19:34:43 +0000 (+1000) Subject: Remove the server-testcase folder (unused elsewhere, contains traces of regex from... X-Git-Tag: xonotic-v0.8.5~864^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F841%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Remove the server-testcase folder (unused elsewhere, contains traces of regex from sweeping gamecode changes and likely does not work at all now) --- diff --git a/qcsrc/server-testcase/framework.qc b/qcsrc/server-testcase/framework.qc deleted file mode 100644 index 1735e1c11..000000000 --- a/qcsrc/server-testcase/framework.qc +++ /dev/null @@ -1,18 +0,0 @@ -void LOG_TRACE(string s, ...) = #25; -string ftos(float f) = #26; -string vtos(vector v) = #27; -void error(string e) = #10; -float test(); - -spawnfunc(worldspawn) -{ - float r; - LOG_TRACE("TESTCASE: START"); - r = test(); - if(r == 1) - error("TESTCASE: PASS"); - else if(r == 0) - error("TESTCASE: FAIL"); - else - error("TESTCASE: INVALID"); -} diff --git a/qcsrc/server-testcase/progs.src b/qcsrc/server-testcase/progs.src deleted file mode 100644 index bd5c571f4..000000000 --- a/qcsrc/server-testcase/progs.src +++ /dev/null @@ -1,4 +0,0 @@ -../../progs-testcase.dat -../server/sys.qh -framework.qc -testcase.qc diff --git a/qcsrc/server-testcase/run.sh b/qcsrc/server-testcase/run.sh deleted file mode 100755 index c05013bfe..000000000 --- a/qcsrc/server-testcase/run.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -if [ "$#" -lt 3 ]; then - echo "Usage: $0 'float test() { if(fail) return 0; else if(good) return 1; else return -1; }' ./darkplaces-dedicated basement +sv_cheats 1" - exit 125 -fi - -case "$0" in - */*) - dir=${0%/*} - ;; - *) - dir=`pwd` - ;; -esac -testcase=$1; shift -engine=$1; shift -map=$1; shift -echo "$testcase" > "$dir/testcase.qc" -if ( cd $dir && fteqcc ); then - set -- "$engine" -xonotic -basedir "$dir/../../.." +sv_progs progs-testcase.dat "$@" +map "$map" - if [ -n "$GDB_ME" ]; then - cmdfile=`mktemp` - { - echo "break VM_dprint" - echo "run" - echo "delete 1" - echo "finish" - } > "$cmdfile" - gdb -x "$cmdfile" --args "$@" - rm -f "$cmdfile" - exit 0 - else - r=`"$@" | tee /dev/stderr` - fi - case "$r" in - *"TESTCASE: PASS"*) - echo "PASS detected" - exit 0 - ;; - *"TESTCASE: FAIL"*) - echo "FAIL detected" - exit 1 - ;; - *"TESTCASE: INVALID"*) - echo "INVALID detected" - exit 125 - ;; - *) - echo "Running failed" - exit 125 - ;; - esac -else - echo "Compilation failed" - exit 125 -fi