Global variable gDeviceType correctly set (#611)

Add gDeviceType set on kernel_read_write tests(image_streams)
as the device type affects the way validation is performed in the test.

Signed-off-by: John Kesapides <john.kesapides@arm.com>
This commit is contained in:
John Kesapides
2020-03-26 22:14:46 +00:00
committed by GitHub
parent 687dc06254
commit d128fea964

View File

@@ -253,7 +253,7 @@ int runTestHarnessWithCheck( int argc, const char *argv[], int testNum, test_def
}
}
gDeviceType = device_type;
switch (device_type)
{
@@ -344,6 +344,13 @@ int runTestHarnessWithCheck( int argc, const char *argv[], int testNum, test_def
device = devices[choosen_device_index];
err = clGetDeviceInfo( device, CL_DEVICE_TYPE, sizeof(gDeviceType), &gDeviceType, NULL );
if( err )
{
print_error( err, "Unable to get device type" );
return TEST_FAIL;
}
if( printDeviceHeader( device ) != CL_SUCCESS )
{
return EXIT_FAILURE;