mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix parsing of offline compilation options in test_select (#429)
The local parsing of arguments in test_select.c throws away any unknown arguments. Pass these to parseCustomParam() before the local argument parsing, so that the offline compilation options work as expected. Fixes #327. Signed-off-by: Stuart Brady <stuart.brady@arm.com>
This commit is contained in:
committed by
Kévin Petit
parent
4cb8fc49f8
commit
67655e6fe5
@@ -58,6 +58,8 @@ static int doTest(cl_command_queue queue, cl_context context,
|
||||
|
||||
static void printUsage( void );
|
||||
|
||||
static void TestFinishAtExit(void);
|
||||
|
||||
//-----------------------------------------
|
||||
// Definitions and initializations
|
||||
//-----------------------------------------
|
||||
@@ -573,8 +575,17 @@ test_definition test_list[] = {
|
||||
|
||||
const int test_num = ARRAY_SIZE( test_list );
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
test_start();
|
||||
atexit(TestFinishAtExit);
|
||||
|
||||
argc = parseCustomParam(argc, argv);
|
||||
if (argc == -1)
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||
|
||||
if( NULL == argList )
|
||||
@@ -653,3 +664,8 @@ static void printUsage( void )
|
||||
log_info( "\t%s\n", test_list[i].name );
|
||||
}
|
||||
}
|
||||
|
||||
static void TestFinishAtExit(void)
|
||||
{
|
||||
test_finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user