From ff3e88e024c4bc44e979c865b30cc40565644dc0 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 22 Aug 2019 10:17:57 +0200 Subject: [PATCH] enable catch unit tests --- .gitlab-ci.yml | 1 + tests/build_debug.sh | 2 +- tests/build_mpi.sh | 2 +- tests/catch/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37b88647..9b527376 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,6 +40,7 @@ build_win: -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DUSE_OCC=ON -DUSE_CCACHE=ON + -DENABLE_UNIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release - cmake --build . --target install --config Release diff --git a/tests/build_debug.sh b/tests/build_debug.sh index 5f9d68e5..c69af43c 100755 --- a/tests/build_debug.sh +++ b/tests/build_debug.sh @@ -1,6 +1,6 @@ cd mkdir -p build/netgen cd build/netgen -cmake ../../src/netgen -DUSE_CCACHE=ON -DBUILD_TYPE=DEBUG +cmake ../../src/netgen -DUSE_CCACHE=ON -DBUILD_TYPE=DEBUG -DENABLE_UNIT_TESTS=ON make -j12 make install diff --git a/tests/build_mpi.sh b/tests/build_mpi.sh index 464bb395..190423ac 100644 --- a/tests/build_mpi.sh +++ b/tests/build_mpi.sh @@ -1,6 +1,6 @@ cd mkdir -p build/netgen cd build/netgen -cmake ../../src/netgen -DUSE_CCACHE=ON -DUSE_MPI=ON +cmake ../../src/netgen -DUSE_CCACHE=ON -DUSE_MPI=ON -DENABLE_UNIT_TESTS=ON make -j12 make install diff --git a/tests/catch/CMakeLists.txt b/tests/catch/CMakeLists.txt index 29f234ff..f3d12fcf 100644 --- a/tests/catch/CMakeLists.txt +++ b/tests/catch/CMakeLists.txt @@ -14,7 +14,7 @@ add_test(NAME unit_tests_built COMMAND ${CMAKE_COMMAND} --build . --target unit_ macro(add_unit_test name sources) add_executable(test_${name} ${sources} ) - target_link_libraries(test_${name} ngcore catch_main ${PYTHON_LIBRARIES}) + target_link_libraries(test_${name} ngcore catch_main mesh ${PYTHON_LIBRARIES}) add_dependencies(unit_tests test_${name}) add_test(NAME unit_${name} COMMAND test_${name})