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:
Ahmed Hesham
2025-03-18 17:10:21 +00:00
committed by GitHub
parent d4c292ed46
commit 2131aff0e9
14 changed files with 664 additions and 1002 deletions

View File

@@ -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