mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-07-01 10:38:17 +00:00
unit tests: Indicate missing unmet dependencies
The identifiers of the unmet dependencies of a test case are stored in a buffer of fixed size that can be potentially too small to store all the unmet dependencies. Indicate in test reports if some unmet dependencies are missing. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
69cc630750
commit
b19ad118dd
|
@ -476,6 +476,7 @@ int execute_tests( int argc , const char ** argv )
|
||||||
{
|
{
|
||||||
size_t unmet_dep_count = 0;
|
size_t unmet_dep_count = 0;
|
||||||
int unmet_dependencies[20];
|
int unmet_dependencies[20];
|
||||||
|
int missing_unmet_dependencies = 0;
|
||||||
|
|
||||||
test_filename = test_files[ testfile_index ];
|
test_filename = test_files[ testfile_index ];
|
||||||
|
|
||||||
|
@ -496,6 +497,7 @@ int execute_tests( int argc , const char ** argv )
|
||||||
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
unmet_dep_count = 0;
|
unmet_dep_count = 0;
|
||||||
|
missing_unmet_dependencies = 0;
|
||||||
|
|
||||||
if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
|
if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
|
||||||
break;
|
break;
|
||||||
|
@ -527,6 +529,10 @@ int execute_tests( int argc , const char ** argv )
|
||||||
unmet_dependencies[unmet_dep_count] = dep_id;
|
unmet_dependencies[unmet_dep_count] = dep_id;
|
||||||
unmet_dep_count++;
|
unmet_dep_count++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
missing_unmet_dependencies = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -595,11 +601,14 @@ int execute_tests( int argc , const char ** argv )
|
||||||
mbedtls_fprintf( stdout, "%d ",
|
mbedtls_fprintf( stdout, "%d ",
|
||||||
unmet_dependencies[i] );
|
unmet_dependencies[i] );
|
||||||
}
|
}
|
||||||
|
if( missing_unmet_dependencies )
|
||||||
|
mbedtls_fprintf( stdout, "..." );
|
||||||
}
|
}
|
||||||
mbedtls_fprintf( stdout, "\n" );
|
mbedtls_fprintf( stdout, "\n" );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
|
|
||||||
unmet_dep_count = 0;
|
unmet_dep_count = 0;
|
||||||
|
missing_unmet_dependencies = 0;
|
||||||
}
|
}
|
||||||
else if( ret == DISPATCH_TEST_SUCCESS )
|
else if( ret == DISPATCH_TEST_SUCCESS )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue