From d41b991056fee1d54f153b7a429741f3489cda28 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Fri, 19 Aug 2022 23:46:11 +0400 Subject: Signal tests condition in CMake --- source/test/programs/CMakeLists.txt | 20 +++++++++++--------- source/test/programs/signals.cpp | 3 +-- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'source') diff --git a/source/test/programs/CMakeLists.txt b/source/test/programs/CMakeLists.txt index 22e50de..5baf56a 100644 --- a/source/test/programs/CMakeLists.txt +++ b/source/test/programs/CMakeLists.txt @@ -29,13 +29,15 @@ if(KIT_ENABLE_TESTING) PROPERTIES TIMEOUT "15") - add_executable(signals signals.cpp) - target_link_libraries(signals ${KIT_TEST_LIBRARY}) - add_test( - NAME signals_test - COMMAND signals --no-carriage-return) - set_tests_properties( - signals_test - PROPERTIES - TIMEOUT "15") + if(NOT MSVC) + add_executable(signals signals.cpp) + target_link_libraries(signals ${KIT_TEST_LIBRARY}) + add_test( + NAME signals_test + COMMAND signals --no-carriage-return) + set_tests_properties( + signals_test + PROPERTIES + TIMEOUT "15") + endif() endif() diff --git a/source/test/programs/signals.cpp b/source/test/programs/signals.cpp index 97cae83..a216744 100644 --- a/source/test/programs/signals.cpp +++ b/source/test/programs/signals.cpp @@ -6,7 +6,7 @@ /* FIXME * MSVC tests fail in GitHub Actions. */ -#ifndef _MSC_VER + TEST("c++ exception") { throw std::exception {}; } @@ -18,7 +18,6 @@ TEST("abort") { TEST("invalid access") { *(volatile int *) nullptr = 42; } -#endif int main(int argc, char **argv) { #ifndef _MSC_VER -- cgit v1.2.3