diff options
author | Carbenium <carbenium@outlook.com> | 2020-07-22 20:27:54 +0200 |
---|---|---|
committer | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-07-24 12:00:54 +0200 |
commit | 6a28ee7b2a4269aa7e43265d1cd0067537e3e883 (patch) | |
tree | 0318b45951240f81cdf9c3c36e493e16d75f81be /.circleci | |
parent | 3c0ac7302f902d1811d2c215217a3d701f8b5b19 (diff) |
dep: Add catch2 unit test framework and wire it up
To enable the test suite, make sure to configure CMake with -DBUILD_TESTING=1 , since it is disabled by default. The catch2 dependency will be downloaded during configure time.
Also add a new target "tests-common", which includes unit tests for the "common" project. To finally run the tests use the "test" target.
CircleCI: Run unit tests
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f4f0463cc6..e96539968a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: command: | mkdir bin cd bin - cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install + cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1 cd .. - run: name: SQL checks @@ -42,7 +42,15 @@ jobs: command: | cd bin make -j 4 -k && make install - cd check_install/bin + - run: + name: Unit tests + command: | + cd bin + make test + - run: + name: Check executables + command: | + cd bin/check_install/bin ./authserver --version ./worldserver --version nopch: |