Skip to content
Permalink
Browse files
Add simple functional test to CI
  • Loading branch information
sfan5 committed Aug 27, 2021
1 parent 8b563f4 commit 5c435f6459be4b1676d1f829363c7e99076f5c15
Showing with 23 additions and 0 deletions.
  1. +10 −0 .github/workflows/build.yml
  2. +12 −0 util/ci/script.sh
  3. +1 −0 util/ci/test_block
@@ -33,6 +33,11 @@ jobs:
CC: gcc
CXX: g++

- name: Test
run: |
source util/ci/script.sh
do_functional_test
clang:
runs-on: ubuntu-20.04
steps:
@@ -49,3 +54,8 @@ jobs:
env:
CC: clang
CXX: clang++

- name: Test
run: |
source util/ci/script.sh
do_functional_test
@@ -13,3 +13,15 @@ run_build() {

make -j2
}

do_functional_test() {
mkdir testmap
echo "backend = sqlite3" >testmap/world.mt
sqlite3 testmap/map.sqlite <<END
CREATE TABLE blocks(pos INT,data BLOB);
INSERT INTO blocks(pos, data) VALUES(0, x'$(cat util/ci/test_block)');
END

./minetestmapper --noemptyimage -i ./testmap -o map.png
file map.png
}
@@ -0,0 +1 @@
1b00ffff020278daedd4c1090000080331dd7f691710faf12589235cb12ae870fca6bffefaebafbffefaebafbffefaebbff7b708fdf1ffd11ffdd11ffdd11ffd01000000000000003836d59f010578da63000000010001000000ffffffff000002000000036169720001000d64656661756c743a73746f6e650a0000

0 comments on commit 5c435f6

Please sign in to comment.