From 6f15d75538d9616e3f661b88e5fb2f6c4e1522b2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 24 Mar 2021 19:36:11 +0300 Subject: add CTest tests --- .github/workflows/ci.yml | 4 +++- CMakeLists.txt | 2 ++ test/CMakeLists.txt | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) 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 "$" DESTINATION bin OPTIONAL) endif() + +add_test(NAME unit_tests COMMAND unit_tests) -- cgit v1.2.3