diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-24 19:36:11 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-24 19:36:11 +0300 |
commit | 6f15d75538d9616e3f661b88e5fb2f6c4e1522b2 (patch) | |
tree | c76f99b80494d45fb374d6bea6cd880c1a5c3f38 | |
parent | update cmake-common (diff) | |
download | winapi-utf8-6f15d75538d9616e3f661b88e5fb2f6c4e1522b2.tar.gz winapi-utf8-6f15d75538d9616e3f661b88e5fb2f6c4e1522b2.zip |
add CTest tests
-rw-r--r-- | .github/workflows/ci.yml | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f990dd..d6e40a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,5 +71,7 @@ jobs: name: 'winapi-utf8-${{ matrix.os }}-${{ matrix.toolset }}-${{ matrix.platform }}-${{ matrix.configuration }}' path: '${{ runner.workspace }}/build/install/' - name: Test - run: ../build/install/bin/winapi-utf8-unit-tests + run: | + cd ../build/cmake + ctest -C '${{ env.CONFIGURATION }}' --verbose if: runner.os == 'Windows' diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bfa28f..9408887 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.5) # for Boost::* imported targets project(winapi_utf8 CXX) +enable_testing() + include(cmake/common.cmake) file(GLOB_RECURSE winapi_utf8_include "include/*.hpp") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c410383..d23dc87 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -11,3 +11,5 @@ install(TARGETS unit_tests RUNTIME DESTINATION bin) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") install(FILES "$<TARGET_PDB_FILE:unit_tests>" DESTINATION bin OPTIONAL) endif() + +add_test(NAME unit_tests COMMAND unit_tests) |