From acea210d59683c280c1e9b1cff2c1358f040e4fc Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Thu, 3 Oct 2019 03:34:22 +1000 Subject: [PATCH] Improve serverbench command WRT #273 --- .gitignore | 1 + misc/tools/all/xonotic.subr | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ab43afbb..a34881c7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ .idea/ /result* +/SERVERBENCH_TEMP diff --git a/misc/tools/all/xonotic.subr b/misc/tools/all/xonotic.subr index 9bc4cd6e..dabd1fd4 100644 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -395,12 +395,14 @@ case "$cmd" in ;; serverbench) # TODO(rpolzer): Why does :anticheat: output differ? Total game time differs? Why? - verbose "$SELF" run "$@" -noconfig -nohome +exec serverbench.cfg |\ + mkdir SERVERBENCH_TEMP + verbose "$SELF" run dedicated -noconfig -userdir SERVERBENCH_TEMP +exec serverbench.cfg |\ tee /dev/stderr |\ grep '^:' |\ grep -v '^:gamestart:' |\ grep -v '^:anticheat:' |\ md5sum + rm -rf SERVERBENCH_TEMP ;; *) handled=false -- 2.39.2