mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 07:59:01 +00:00
Move printing sub-test information into test harness (#421)
This removes all the duplicated code from each test, and moves it to test harness so that we have single place where this information is printed. Signed-off-by: Radek Szymanski <radek.szymanski@arm.com>
This commit is contained in:
committed by
Kévin Petit
parent
19951a2a14
commit
03650057bb
@@ -443,18 +443,6 @@ int main(int argc, const char *argv[])
|
||||
// Restore FP state before leaving
|
||||
RestoreFPState(&oldMode);
|
||||
|
||||
if (gTestFailure == 0) {
|
||||
if (gTestCount > 1)
|
||||
log_info("PASSED %d of %d sub-tests.\n", gTestCount, gTestCount);
|
||||
else
|
||||
log_info("PASSED sub-test.\n");
|
||||
} else if (gTestFailure > 0) {
|
||||
if (gTestCount > 1)
|
||||
log_error("FAILED %d of %d sub-tests.\n", gTestFailure, gTestCount);
|
||||
else
|
||||
log_error("FAILED sub-test.\n");
|
||||
}
|
||||
|
||||
free(argList);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ int test_read_image_type( cl_device_id device, cl_context context, cl_command_qu
|
||||
}
|
||||
if( retCode != 0 )
|
||||
{
|
||||
gTestFailure++;
|
||||
gFailCount++;
|
||||
log_error( "FAILED: " );
|
||||
print_read_header( format, imageSampler, true );
|
||||
log_info( "\n" );
|
||||
@@ -296,7 +296,7 @@ int test_image_set( cl_device_id device, cl_context context, cl_command_queue qu
|
||||
|
||||
if ( ( 0 == is_extension_available( device, "cl_khr_3d_image_writes" )) && (imageType == CL_MEM_OBJECT_IMAGE3D) && (formatTestFn == test_write_image_formats) )
|
||||
{
|
||||
gTestFailure++;
|
||||
gFailCount++;
|
||||
log_error( "-----------------------------------------------------\n" );
|
||||
log_error( "FAILED: test writing CL_MEM_OBJECT_IMAGE3D images\n" );
|
||||
log_error( "This device does not support the mandated extension cl_khr_3d_image_writes.\n");
|
||||
|
||||
@@ -866,7 +866,7 @@ int test_write_image_formats( cl_device_id device, cl_context context, cl_comman
|
||||
|
||||
if( retCode != 0 )
|
||||
{
|
||||
gTestFailure++;
|
||||
gFailCount++;
|
||||
log_error( "FAILED: " );
|
||||
print_write_header( &imageFormat, true );
|
||||
log_info( "\n" );
|
||||
|
||||
Reference in New Issue
Block a user