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 Dec 11, 2024
1 parent 440ed5f commit 167ad9b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
11 changes: 6 additions & 5 deletions test_conformance/vulkan/test_vulkan_api_consistency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ int test_consistency_external_buffer(cl_device_id deviceID, cl_context _context,
#else
if (!is_extension_available(devList[0], "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 @@ -220,8 +220,9 @@ int test_consistency_external_image(cl_device_id deviceID, cl_context _context,
#else
if (!is_extension_available(devList[0], "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
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ int test_consistency_external_for_1dimage(cl_device_id deviceID,
#else
if (!is_extension_available(devList[0], "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 @@ -56,9 +56,9 @@ int test_consistency_external_for_3dimage(cl_device_id deviceID,
#else
if (!is_extension_available(devList[0], "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 167ad9b

Please sign in to comment.