X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Ftools%2Fsv_game-hashtest.sh;fp=qcsrc%2Ftools%2Fsv_game-hashtest.sh;h=431a6f7c1636f80cd750cb7469d48193366b1c70;hb=bae3de16e76ed9b25933db14b165ec86aa8f1608;hp=f3f0eb233e4279fc4abcf0ba8de9c1428d3a8949;hpb=db92f976f517632b7feb1bce79137322f58f3240;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/tools/sv_game-hashtest.sh b/qcsrc/tools/sv_game-hashtest.sh index f3f0eb233..431a6f7c1 100755 --- a/qcsrc/tools/sv_game-hashtest.sh +++ b/qcsrc/tools/sv_game-hashtest.sh @@ -185,12 +185,13 @@ mkdir -p data/maps createdtoday "data/maps/_init.bsp" \ || wget -nv -O data/maps/_init.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp +PASS=0 while read -r LINE do printf "%s\n" "$LINE" - [ "$LINE" = "All tests OK" ] && PASS=1 + printf "%s\n" "$LINE" | grep -q ".*All tests OK$" && PASS=1 done < <(${ENGINE} +developer 1 +map _init +sv_cmd runtest +wait +quit) -test "$PASS" = "1" || { printf 'sv_cmd runtest failed!'; exit 1; } +test "$PASS" = "1" || { printf "\033[1;31m%s\033[0m\n" "sv_cmd runtest failed!"; exit 1; } ${ENGINE} +map _init +sv_cmd dumpnotifs +wait +quit diff notifications.cfg data/data/notifications_dump.cfg || @@ -228,8 +229,8 @@ then # green ok print printf "\033[32m%s\033[0m\n" "hashes match" exit 0 else # red error print - printf "\033[32m%s\033[0m\n" "expected: $EXPECT" - printf "\033[32m%s\033[0m\n" " actual: $HASH" - printf "\033[31m%s\033[0m\n" "!!! ERROR: HASHES DO NOT MATCH !!!" + printf "\033[31m%s\033[0m\n" "expected: $EXPECT" + printf "\033[31m%s\033[0m\n" " actual: $HASH" + printf "\033[1;31m%s\033[0m\n" "!!! ERROR: HASHES DO NOT MATCH !!!" exit 1 fi