From 24597e014595fe336c052c1fc8ef699618fd24f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Petit?= Date: Tue, 18 Feb 2025 18:52:44 +0000 Subject: [PATCH] Report external sharing tests as skipped instead of failed when not supported (#2277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Throwing an exception in the constructor for VulkanTestBase was always reported as an error. Signed-off-by: Kévin Petit --- test_conformance/vulkan/vulkan_test_base.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test_conformance/vulkan/vulkan_test_base.h b/test_conformance/vulkan/vulkan_test_base.h index d4cfa684..82b8e639 100644 --- a/test_conformance/vulkan/vulkan_test_base.h +++ b/test_conformance/vulkan/vulkan_test_base.h @@ -43,15 +43,6 @@ struct VulkanTestBase vkDevice.reset( new VulkanDevice(getAssociatedVulkanPhysicalDevice(device))); - if (!(is_extension_available(device, "cl_khr_external_memory") - && is_extension_available(device, "cl_khr_external_semaphore"))) - { - log_info("Device does not support cl_khr_external_memory " - "or cl_khr_external_semaphore\n"); - log_info(" TEST SKIPPED\n"); - throw std::runtime_error("VulkanTestBase not supported"); - } - cl_platform_id platform; cl_int error = clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL); @@ -101,6 +92,15 @@ template int MakeAndRunTest(cl_device_id device, cl_context context, cl_command_queue queue, cl_int nelems) { + if (!(is_extension_available(device, "cl_khr_external_memory") + && is_extension_available(device, "cl_khr_external_semaphore"))) + { + log_info("Device does not support cl_khr_external_memory " + "or cl_khr_external_semaphore\n"); + log_info(" TEST SKIPPED\n"); + return TEST_SKIPPED_ITSELF; + } + if (!checkVkSupport()) { log_info("Vulkan supported GPU not found \n");