Skip compiler unload/reload tests if compiler is not available (#986)

* Skip compiler unload/reload tests if compiler is not available

Note that tests that use the compiler helper functions but won't work without a
compiler are in the `subtests_to_skip_with_offline_compiler` list.  I didn't do
that here because they tests directly use `clBuildProgram` etc directly,
because they're specifically testing it's behaviour in edge-cases.

* Change type of status variable
This commit is contained in:
Alastair Murray
2020-10-28 08:06:11 +00:00
committed by GitHub
parent c2bca05a32
commit f162c8b5ef
4 changed files with 42 additions and 23 deletions

View File

@@ -289,15 +289,7 @@ static int test_CL_DEVICE_OPENCL_C_VERSION_versions(cl_device_id device,
int test_opencl_c_versions(cl_device_id device, cl_context context,
cl_command_queue queue, int num_elements)
{
cl_bool compilerAvailable = CL_FALSE;
cl_int error =
clGetDeviceInfo(device, CL_DEVICE_COMPILER_AVAILABLE,
sizeof(compilerAvailable), &compilerAvailable, NULL);
if (compilerAvailable == CL_FALSE)
{
log_info("Skipping test - no compiler is available.\n");
return TEST_SKIPPED_ITSELF;
}
check_compiler_available(device);
const Version version = get_device_cl_version(device);