]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
CI: run serverbench
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 7 Jan 2016 05:55:43 +0000 (16:55 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 7 Jan 2016 05:55:43 +0000 (16:55 +1100)
.gitlab-ci.yml

index 933eb4b065b26ea2d0877e11d6e596770b35d138..8e4ee84c98b3d4519b9f6df679eabf465bdf889b 100644 (file)
@@ -10,10 +10,11 @@ before_script:
   - export QCC="$PWD/gmqcc/gmqcc"
 
   - ln -s $PWD data/xonotic-data.pk3dir
-  - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
 
-build:
+test_sv_unit:
+  stage: test
   script:
+    - mkdir maps && wget -O maps/gitlab-ci.bsp https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/_init/_init.bsp
     - make
     - while read line; do
         echo $line;
@@ -21,6 +22,23 @@ build:
       done < <(${ENGINE} +developer 1 +map gitlab-ci +sv_cmd runtest +exit)
     - exit 1
 
+test_sv_game:
+  stage: test
+  script:
+    - wget -O data/g-23.pk3 http://beta.xonotic.org/autobuild-bsp/latest/g-23.pk3
+    - make
+    - EXPECT=dd534b9e83d5e07cd43e0a13ac61a646
+    - HASH=$(${ENGINE} -noconfig -nohome +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"
+    - exit $?
+
 doxygen:  # rename to 'pages' when gitlab.com allows pages to exceed 100MiB
   stage: deploy
   script: