Skip to content

Commit

Permalink
Skip the test instead of throwing an error
Browse files Browse the repository at this point in the history
If the device does not support the required extension, skip the test,
instead of throwing an exception and failing.

Signed-off-by: Ahmed Hesham <[email protected]>
  • Loading branch information
ahesham-arm committed Jan 17, 2025
1 parent 138bc23 commit 6cf8d6d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions test_conformance/vulkan/test_vulkan_api_consistency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ struct ConsistencyExternalBufferTest : public VulkanTestBase
#else
if (!is_extension_available(device, "cl_khr_external_memory_opaque_fd"))
{
throw std::runtime_error(
"Device does not support "
"cl_khr_external_memory_opaque_fd extension \n");
log_info("Device does not support "
"cl_khr_external_memory_opaque_fd extension \n");
return TEST_SKIPPED_ITSELF;
}
#endif

Expand Down Expand Up @@ -201,9 +201,9 @@ struct ConsistencyExternalImageTest : public VulkanTestBase
#else
if (!is_extension_available(device, "cl_khr_external_memory_opaque_fd"))
{
test_fail(
"Device does not support cl_khr_external_memory_opaque_fd "
"extension \n");
log_info("Device does not support cl_khr_external_memory_opaque_fd "
"extension \n");
return TEST_SKIPPED_ITSELF;
}
#endif
uint32_t width = 256;
Expand Down Expand Up @@ -357,9 +357,9 @@ struct ConsistencyExternalSemaphoreTest : public VulkanTestBase
#else
if (!is_extension_available(device, "cl_khr_external_memory_opaque_fd"))
{
test_fail(
"Device does not support cl_khr_external_memory_opaque_fd "
"extension \n");
log_info("Device does not support cl_khr_external_memory_opaque_fd "
"extension \n");
return TEST_SKIPPED_ITSELF;
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ struct ConsistencyExternalImage1DTest : public VulkanTestBase
#else
if (!is_extension_available(device, "cl_khr_external_memory_opaque_fd"))
{
throw std::runtime_error(
"Device does not support cl_khr_external_memory_opaque_fd "
"extension \n");
log_info("Device does not support "
"cl_khr_external_memory_opaque_fd extension \n");
return TEST_SKIPPED_ITSELF;
}
#endif
uint32_t width = 256;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ struct ConsistencyExternalImage3DTest : public VulkanTestBase
#else
if (!is_extension_available(device, "cl_khr_external_memory_opaque_fd"))
{
throw std::runtime_error(
"Device does not support cl_khr_external_memory_opaque_fd "
"extension \n");
log_info("Device does not support "
"cl_khr_external_memory_opaque_fd extension \n");
return TEST_SKIPPED_ITSELF;
}
#endif
uint32_t width = 256;
Expand Down

0 comments on commit 6cf8d6d

Please sign in to comment.