diff options
author | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-19 23:46:11 +0400 |
---|---|---|
committer | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-19 23:46:11 +0400 |
commit | d41b991056fee1d54f153b7a429741f3489cda28 (patch) | |
tree | 35b25b4f668196819f13ee23a12ca9274a82791b /source/test | |
parent | d9e91f73e5760fc6ee115ac2947e1ef999f6bef5 (diff) | |
download | kit-d41b991056fee1d54f153b7a429741f3489cda28.zip |
Signal tests condition in CMake
Diffstat (limited to 'source/test')
-rw-r--r-- | source/test/programs/CMakeLists.txt | 20 | ||||
-rw-r--r-- | source/test/programs/signals.cpp | 3 |
2 files changed, 12 insertions, 11 deletions
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 |