- ln -s $PWD data/xonotic-data.pk3dir
- export MAKEFLAGS=-j$(nproc); echo MAKEFLAGS=$MAKEFLAGS
-# FIXME: -march=native -mtune=native _changes the hash_, why?!?
-# - export CC="gcc -pipe -march=native -mtune=native"
- export CC="gcc -pipe"
- >
test_sv_game:
stage: test
script:
- - >
- if wget -nv https://beta.xonotic.org/pipeline-bin/xonotic-linux64-dedicated ; then
- export ENGINE="$PWD/xonotic-linux64-dedicated"
- chmod +x "$ENGINE"
- else
- git clone --depth=1 --branch=div0-stable https://gitlab.com/xonotic/darkplaces.git darkplaces
- make -C darkplaces sv-release || exit 1
- export ENGINE="$PWD/darkplaces/darkplaces-dedicated -xonotic"
- fi
- - export ENGINE="$ENGINE -noconfig -nohome"
-
- - make qc || exit 1
-
- - mkdir -p data/maps
- - wget -nv -O data/maps/_init.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
-
- - while read LINE; do
- echo $LINE;
- [ "$LINE" = "All tests OK" ] && PASS=1;
- done < <(${ENGINE} +developer 1 +map _init +sv_cmd runtest +wait +quit)
- - test "$PASS" = "1" || { echo 'sv_cmd runtest failed!'; exit 1; }
-
- - ${ENGINE} +map _init +sv_cmd dumpnotifs +wait +quit
- - diff notifications.cfg data/data/notifications_dump.cfg ||
- { echo 'Please update notifications.cfg using `dumpnotifs`!'; exit 1; }
-
-# - wget -nv -O data/stormkeep.pk3 http://beta.xonotic.org/autobuild-bsp/latest/stormkeep.pk3
-# ^^ INCORRECT: /latest/stormkeep.pk3 is the most recently built, not necessarily the one built from master!
-# we can't get the one from master directly as there's no /stable/stormkeep.pk3 or /master/stormkeep.pk3
-# and we can't run misc/tools/xonotic-map-compiler-autobuild as it uses commit hashes from xonotic-maps.pk3dir to generate filenames
-# but the autobuild server can run it and provide us the resulting pk3:
- - wget -nv -O data/stormkeep.pk3 https://beta.xonotic.org/pipeline-bin/stormkeep.pk3
-# see also: misc/infrastructure/xonotic-release-build.cron
- - wget -nv -O data/maps/stormkeep.mapinfo https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.mapinfo
- - wget -nv -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- - wget -nv -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
-
- - EXPECT=b4bfc34b5a52ba950de9814c2c52c1c3
- - HASH=$(${ENGINE} +exec serverbench.cfg
- | tee /dev/stderr
- | grep '^:'
- | grep -v '^:gamestart:'
- | grep -v '^:anticheat:'
- | md5sum | awk '{ print $1 }')
- - echo 'expected:' $EXPECT
- - echo ' actual:' $HASH
- - test "$HASH" == "$EXPECT"
+ - export EXPECT=13aa630f559c7683195b8c8d5e0a1522
+ - qcsrc/tools/sv_game-hashtest.sh
- exit $?