mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Get rid of test_finish macro and related ATF cruft (#633)
Closes #431 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -163,7 +163,6 @@ int main(int argc, const char *argv[])
|
||||
argc = parseCustomParam(argc, argv);
|
||||
if (argc == -1)
|
||||
{
|
||||
test_finish ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -207,7 +206,6 @@ int main(int argc, const char *argv[])
|
||||
log_info( "Note: Any 3.2 test names must follow 2.1 test names on the command line.\n" );
|
||||
log_info( "Use environment variables to specify desired device.\n" );
|
||||
|
||||
test_finish();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -228,11 +226,9 @@ int main(int argc, const char *argv[])
|
||||
int supported = glEnv->SupportsCLGLInterop( requestedDeviceType );
|
||||
if( supported == 0 ) {
|
||||
log_info("Test not run because GL-CL interop is not supported for any devices of the requested type.\n");
|
||||
test_finish();
|
||||
return 0;
|
||||
} else if ( supported == -1 ) {
|
||||
log_error("Unable to setup the test or failed to determine if CL-GL interop is supported.\n");
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -248,7 +244,6 @@ int main(int argc, const char *argv[])
|
||||
// At least one device supports CL-GL interop, so init the test.
|
||||
if( glEnv->Init( &argc, (char **)argv, CL_FALSE ) ) {
|
||||
log_error("Failed to initialize the GL environment for this test.\n");
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -257,7 +252,6 @@ int main(int argc, const char *argv[])
|
||||
if( sCurrentContext == NULL )
|
||||
{
|
||||
log_error( "ERROR: Unable to obtain CL context from GL\n" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -268,19 +262,16 @@ int main(int argc, const char *argv[])
|
||||
if( error != CL_SUCCESS )
|
||||
{
|
||||
print_error( error, "Unable to get device count from context" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
deviceIDs = (cl_device_id *)malloc(numDevices);
|
||||
if (deviceIDs == NULL) {
|
||||
print_error( error, "malloc failed" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
error = clGetContextInfo( sCurrentContext, CL_CONTEXT_DEVICES, numDevices, deviceIDs, NULL);
|
||||
if( error != CL_SUCCESS ) {
|
||||
print_error( error, "Unable to get device list from context" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -288,7 +279,6 @@ int main(int argc, const char *argv[])
|
||||
|
||||
if (numDevices < 1) {
|
||||
log_error("No devices found.\n");
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -298,7 +288,6 @@ int main(int argc, const char *argv[])
|
||||
for( size_t i = 0; i < numDevices; i++ ) {
|
||||
log_info( "\nTesting OpenGL 2.x\n" );
|
||||
if( printDeviceHeader( deviceIDs[ i ] ) != CL_SUCCESS ) {
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -322,7 +311,6 @@ int main(int argc, const char *argv[])
|
||||
// At least one device supports CL-GL interop, so init the test.
|
||||
if( glEnv->Init( &argc, (char **)argv, CL_TRUE ) ) {
|
||||
log_error("Failed to initialize the GL environment for this test.\n");
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -330,7 +318,6 @@ int main(int argc, const char *argv[])
|
||||
sCurrentContext = glEnv->CreateCLContext();
|
||||
if( sCurrentContext == NULL ) {
|
||||
log_error( "ERROR: Unable to obtain CL context from GL\n" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -340,19 +327,16 @@ int main(int argc, const char *argv[])
|
||||
error = clGetContextInfo( sCurrentContext, CL_CONTEXT_DEVICES, 0, NULL, &numDevices);
|
||||
if( error != CL_SUCCESS ) {
|
||||
print_error( error, "Unable to get device count from context" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
deviceIDs = (cl_device_id *)malloc(numDevices);
|
||||
if (deviceIDs == NULL) {
|
||||
print_error( error, "malloc failed" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
error = clGetContextInfo( sCurrentContext, CL_CONTEXT_DEVICES, numDevices, deviceIDs, NULL);
|
||||
if( error != CL_SUCCESS ) {
|
||||
print_error( error, "Unable to get device list from context" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -360,7 +344,6 @@ int main(int argc, const char *argv[])
|
||||
|
||||
if (numDevices < 1) {
|
||||
log_error("No devices found.\n");
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -371,7 +354,6 @@ int main(int argc, const char *argv[])
|
||||
for( size_t i = 0; i < numDevices; i++ ) {
|
||||
log_info( "\nTesting OpenGL 3.2\n" );
|
||||
if( printDeviceHeader( deviceIDs[ i ] ) != CL_SUCCESS ) {
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -669,7 +669,6 @@ int test_fence_sync( cl_device_id device, cl_context context, cl_command_queue q
|
||||
if( err != CL_SUCCESS )
|
||||
{
|
||||
print_error( err, "Unable to get device count from context" );
|
||||
test_finish();
|
||||
return -1;
|
||||
}
|
||||
vs_count = (GLint)device_cb / sizeof(cl_device_id);
|
||||
|
||||
Reference in New Issue
Block a user