From 5c435f6459be4b1676d1f829363c7e99076f5c15 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 27 Aug 2021 20:49:29 +0200 Subject: [PATCH] Add simple functional test to CI --- .github/workflows/build.yml | 10 ++++++++++ util/ci/script.sh | 12 ++++++++++++ util/ci/test_block | 1 + 3 files changed, 23 insertions(+) create mode 100644 util/ci/test_block diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f7eab1..b7ebc16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/util/ci/script.sh b/util/ci/script.sh index c27c98f..3d8d35b 100755 --- a/util/ci/script.sh +++ b/util/ci/script.sh @@ -13,3 +13,15 @@ run_build() { make -j2 } + +do_functional_test() { + mkdir testmap + echo "backend = sqlite3" >testmap/world.mt + sqlite3 testmap/map.sqlite <