mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Add utility macro to skip test when an extension is not supported (#2178)
Use in cl_khr_external_semaphore suite as an example. Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -150,6 +150,17 @@ template <typename T> T *register_test(const char *name, Version version)
|
||||
|
||||
#define REGISTER_TEST(name) REGISTER_TEST_VERSION(name, Version(1, 2))
|
||||
|
||||
#define REQUIRE_EXTENSION(name) \
|
||||
do \
|
||||
{ \
|
||||
if (!is_extension_available(deviceID, name)) \
|
||||
{ \
|
||||
log_info(name \
|
||||
" is not supported on this device. Skipping test.\n"); \
|
||||
return TEST_SKIPPED_ITSELF; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
extern int gFailCount;
|
||||
extern int gTestCount;
|
||||
extern cl_uint gReSeed;
|
||||
|
||||
Reference in New Issue
Block a user