diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3c8deda..64c351d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -315,6 +315,9 @@ if(TARGET VoidTests AND TARGET Void::Plugin) add_dependencies(VoidTests VoidServicePluginV1 VoidServicePluginV2) endif() + # The pure-C ABI fixtures use pthreads/nanosleep; they are POSIX-only for + # now (the C++ plugin fixtures above still cover Plugin on Windows). + if(NOT WIN32) enable_language(C) function(_void_add_cabi_fixture target_name source_file) add_library(${target_name} SHARED "${CMAKE_CURRENT_SOURCE_DIR}/plugins/${source_file}") @@ -370,4 +373,5 @@ if(TARGET VoidTests AND TARGET Void::Plugin) "VOID_CABI_CYC_A_PATH=\"$\"" "VOID_CABI_CYC_B_PATH=\"$\"" ) + endif() # NOT WIN32 endif() diff --git a/tests/standalone/Plugin/Configure.cpp b/tests/standalone/Plugin/Configure.cpp index 1642dd1..f7c5ede 100644 --- a/tests/standalone/Plugin/Configure.cpp +++ b/tests/standalone/Plugin/Configure.cpp @@ -11,7 +11,7 @@ using namespace Void::Plugin; -#if defined(VOID_CONFIGURABLE_PATH) && __has_include() +#if defined(VOID_CONFIGURABLE_PATH) namespace { diff --git a/tests/standalone/Plugin/Discovery.cpp b/tests/standalone/Plugin/Discovery.cpp index f004bf0..fd8b13f 100644 --- a/tests/standalone/Plugin/Discovery.cpp +++ b/tests/standalone/Plugin/Discovery.cpp @@ -10,8 +10,7 @@ using namespace Void::Plugin; -#if defined(VOID_TEST_PLUGIN_PATH) && defined(VOID_STATEFUL_V1_PATH) && \ - __has_include() +#if defined(VOID_TEST_PLUGIN_PATH) && defined(VOID_STATEFUL_V1_PATH) Void::Testing::Test discovery_loads_all_plugins_in_filename_order() { diff --git a/tests/standalone/Plugin/HotReloadUnderLoad.cpp b/tests/standalone/Plugin/HotReloadUnderLoad.cpp index 4b45f03..0456397 100644 --- a/tests/standalone/Plugin/HotReloadUnderLoad.cpp +++ b/tests/standalone/Plugin/HotReloadUnderLoad.cpp @@ -14,8 +14,7 @@ using namespace Void::Plugin; -#if defined(VOID_STATEFUL_V1_PATH) && defined(VOID_STATEFUL_V2_PATH) && \ - __has_include() +#if defined(VOID_STATEFUL_V1_PATH) && defined(VOID_STATEFUL_V2_PATH) namespace { diff --git a/tests/standalone/Plugin/Manager.cpp b/tests/standalone/Plugin/Manager.cpp index c456624..3dfe38a 100644 --- a/tests/standalone/Plugin/Manager.cpp +++ b/tests/standalone/Plugin/Manager.cpp @@ -14,8 +14,7 @@ using namespace Void::Plugin; -#if defined(VOID_STATEFUL_V1_PATH) && defined(VOID_STATEFUL_V2_PATH) && \ - __has_include() +#if defined(VOID_STATEFUL_V1_PATH) && defined(VOID_STATEFUL_V2_PATH) namespace { diff --git a/tests/standalone/Plugin/Plugin.cpp b/tests/standalone/Plugin/Plugin.cpp index 54452c6..1db523f 100644 --- a/tests/standalone/Plugin/Plugin.cpp +++ b/tests/standalone/Plugin/Plugin.cpp @@ -25,7 +25,6 @@ Void::Testing::Test plugin_load_missing_file_returns_error() Void::Testing::DisabledTest plugin_load_and_query_skipped() {} #ifdef VOID_TEST_PLUGIN_PATH -# if __has_include() Void::Testing::Test plugin_load_test_plugin() { @@ -77,5 +76,4 @@ Void::Testing::Test plugin_abi_version_matches() Void::Testing::expect_eq(r->info().abi_version, Void::Plugin::ABI_VERSION); } -# endif // has dlfcn.h #endif // VOID_TEST_PLUGIN_PATH diff --git a/tests/standalone/Plugin/PluginHardening.cpp b/tests/standalone/Plugin/PluginHardening.cpp index 17d3a99..2ff7ca2 100644 --- a/tests/standalone/Plugin/PluginHardening.cpp +++ b/tests/standalone/Plugin/PluginHardening.cpp @@ -1,6 +1,7 @@ #include #include #include +// @requires-posix: C ABI plugin fixtures use pthreads/nanosleep. #include #include #include @@ -47,8 +48,7 @@ namespace } } // namespace -#if defined(VOID_CABI_V1_PATH) && defined(VOID_CABI_V2_PATH) && \ - __has_include() +#if defined(VOID_CABI_V1_PATH) && defined(VOID_CABI_V2_PATH) Void::Testing::Test plugin_cabi_v1_to_v2_stateful_quiesce_and_reload() { diff --git a/tests/standalone/Runtime/RuntimeSignals.cpp b/tests/standalone/Runtime/RuntimeSignals.cpp index 443de44..42e7325 100644 --- a/tests/standalone/Runtime/RuntimeSignals.cpp +++ b/tests/standalone/Runtime/RuntimeSignals.cpp @@ -1,3 +1,4 @@ +// @requires-posix: exercises POSIX signal delivery with pthreads. #include #include #include