tests: Further fixes to be able to build on OpenBSD
authorBrad Smith <brad@comstyle.com>
Thu, 1 Sep 2022 05:53:59 +0000 (01:53 -0400)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Thu, 1 Sep 2022 18:21:19 +0000 (12:21 -0600)
tests/framework/framework_config.h.in
tests/framework/shim/shim.h
tests/loader_regression_tests.cpp

index 406722cb397c47417d616ac15919a9c55543aa9b..ddbb0ab4d0251aa78c22497b7ea91fc9f7379ec7 100644 (file)
@@ -99,7 +99,7 @@
 #endif
 #endif
 // Apple doesn't have 32 bit but this should allow tests to run as if it was supported
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
 #define CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE DUMMY_BINARY_LINUX_32
 #define CURRENT_PLATFORM_DUMMY_BINARY_BAD BAD_DUMMY_BINARY_LINUX_64
 #endif
index 066ec3e649e74736beb2c451820e4763c0b7e33b..b619465e27daac01f97232851851969f374dad04 100644 (file)
@@ -208,7 +208,7 @@ extern "C" {
 using PFN_get_platform_shim = PlatformShim* (*)(std::vector<fs::FolderManager>* folders);
 #define GET_PLATFORM_SHIM_STR "get_platform_shim"
 
-#elif defined(__linux__) || defined(__FreeBSD__)
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
 // statically link on linux
 PlatformShim* get_platform_shim(std::vector<fs::FolderManager>* folders);
 #endif
index 97a2a74052639fb372c9c3867edf76b638ba65a5..5e30ad132eff1fd4f8ef0d5580afe50574941dd6 100644 (file)
@@ -2468,7 +2468,7 @@ TEST(CreateInstance, InstanceNullExtensionPtr) {
     ASSERT_EQ(env.vulkan_functions.vkCreateInstance(&info, VK_NULL_HANDLE, &inst), VK_ERROR_EXTENSION_NOT_PRESENT);
 }
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
 // NOTE: Sort order only affects Linux
 TEST(SortedPhysicalDevices, DevicesSortEnabled10NoAppExt) {
     FrameworkEnvironment env{};
@@ -3280,7 +3280,7 @@ TEST(SortedPhysicalDevices, DeviceGroupsSortedDisabled) {
     remove_env_var("VK_LOADER_DISABLE_SELECT");
 }
 
-#endif  // __linux__ || __FreeBSD__
+#endif  // __linux__ || __FreeBSD__ || __OpenBSD__
 
 const char* portability_driver_warning =
     "vkCreateInstance: Found drivers that contain devices which support the portability subset, but the "