Update CTest infrastructure to automatically run qtrocket unit tests
This commit is contained in:
parent
e0f3eb1c45
commit
63a5b8995f
2
.github/workflows/cmake-multi-platform.yml
vendored
2
.github/workflows/cmake-multi-platform.yml
vendored
@ -83,4 +83,4 @@ jobs:
|
||||
working-directory: ${{ steps.strings.outputs.build-output-dir }}
|
||||
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest --build-config ${{ matrix.build_type }}
|
||||
run: ctest --build-config ${{ matrix.build_type }} -R 'qtrocket_*'
|
||||
|
@ -5,6 +5,8 @@ project(qtrocket VERSION 0.1 LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
enable_testing()
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
# Google Test framework
|
||||
@ -48,10 +50,10 @@ endif()
|
||||
FetchContent_MakeAvailable(CURL)
|
||||
|
||||
# eigen dependency
|
||||
FetchContent_Declare(eigen
|
||||
FetchContent_Declare(Eigen
|
||||
GIT_REPOSITORY https://gitlab.com/libeigen/eigen
|
||||
GIT_TAG 3.4.0)
|
||||
FetchContent_MakeAvailable(eigen)
|
||||
FetchContent_MakeAvailable(Eigen)
|
||||
|
||||
# boost dependency
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
enable_testing()
|
||||
|
||||
add_executable(model_tests
|
||||
PartTests.cpp
|
||||
@ -13,5 +12,5 @@ target_link_libraries(model_tests PRIVATE
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(model_tests)
|
||||
|
||||
add_test(model_tests model_tests)
|
||||
add_test(NAME qtrocket_model_tests COMMAND model_tests)
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
enable_testing()
|
||||
|
||||
add_executable(sim_tests
|
||||
USStandardAtmosphereTests.cpp
|
||||
@ -12,5 +11,5 @@ target_link_libraries(sim_tests
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(sim_tests)
|
||||
|
||||
add_test(sim_tests sim_tests)
|
||||
add_test(NAME qtrocket_sim_tests COMMAND sim_tests)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user