mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Migrate compiler suite to the new test registration framework (#2319)
Contributes to #2181. Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
@@ -16,14 +16,34 @@
|
||||
#ifndef _testBase_h
|
||||
#define _testBase_h
|
||||
|
||||
#include "harness/compat.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <vector>
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include "harness/conversions.h"
|
||||
#include "harness/testHarness.h"
|
||||
#include "harness/typeWrappers.h"
|
||||
|
||||
// This is a macro rather than a function to be able to use and act like the
|
||||
// existing test_error macro.
|
||||
//
|
||||
// Not all compiler tests need to use this macro, only those that don't use the
|
||||
// test harness compiler helpers.
|
||||
#define check_compiler_available(DEVICE) \
|
||||
{ \
|
||||
cl_bool compilerAvailable = CL_FALSE; \
|
||||
cl_int error = clGetDeviceInfo((DEVICE), CL_DEVICE_COMPILER_AVAILABLE, \
|
||||
sizeof(compilerAvailable), \
|
||||
&compilerAvailable, NULL); \
|
||||
test_error(error, "Unable to query CL_DEVICE_COMPILER_AVAILABLE"); \
|
||||
if (compilerAvailable == CL_FALSE) \
|
||||
{ \
|
||||
log_info("Skipping test - no compiler is available.\n"); \
|
||||
return TEST_SKIPPED_ITSELF; \
|
||||
} \
|
||||
}
|
||||
|
||||
#include "procs.h"
|
||||
|
||||
// scope guard helper to ensure proper releasing of sub devices
|
||||
struct SubDevicesScopeGuarded
|
||||
|
||||
Reference in New Issue
Block a user