Migrate computeinfo suite to the new test registration framework (#2320)

Contributes to #2181.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham
2025-03-11 21:52:28 +00:00
committed by GitHub
parent 13b82d1833
commit 671ea7b286
5 changed files with 26 additions and 46 deletions

View File

@@ -1251,8 +1251,7 @@ int getPlatformCapabilities(cl_platform_id platform)
return total_errors;
}
int test_computeinfo(cl_device_id deviceID, cl_context context,
cl_command_queue ignoreQueue, int num_elements)
REGISTER_TEST(computeinfo)
{
int err;
int total_errors = 0;
@@ -1411,23 +1410,6 @@ int test_computeinfo(cl_device_id deviceID, cl_context context,
return total_errors;
}
extern int test_extended_versioning(cl_device_id, cl_context, cl_command_queue,
int);
extern int test_device_uuid(cl_device_id, cl_context, cl_command_queue, int);
extern int test_conformance_version(cl_device_id, cl_context, cl_command_queue,
int);
extern int test_pci_bus_info(cl_device_id, cl_context, cl_command_queue, int);
test_definition test_list[] = {
ADD_TEST(computeinfo),
ADD_TEST(extended_versioning),
ADD_TEST(device_uuid),
ADD_TEST_VERSION(conformance_version, Version(3, 0)),
ADD_TEST(pci_bus_info),
};
const int test_num = ARRAY_SIZE(test_list);
int main(int argc, const char** argv)
{
const char** argList = (const char**)calloc(argc, sizeof(char*));
@@ -1453,7 +1435,9 @@ int main(int argc, const char** argv)
}
}
int error = runTestHarness(argCount, argList, test_num, test_list, true, 0);
int error = runTestHarness(
argCount, argList, test_registry::getInstance().num_tests(),
test_registry::getInstance().definitions(), true, 0);
free(argList);