mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 13:25:29 +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 report if some unmet dependencies are missing. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
1d3eab684c
commit
75d26b5d17
|
@ -350,6 +350,7 @@ int main(int argc, const char *argv[])
|
|||
{
|
||||
size_t unmet_dep_count = 0;
|
||||
char *unmet_dependencies[20]; /* only filled when verbose != 0 */
|
||||
int missing_unmet_dependencies = 0;
|
||||
|
||||
test_filename = test_files[ testfile_index ];
|
||||
|
||||
|
@ -371,6 +372,7 @@ int main(int argc, const char *argv[])
|
|||
}
|
||||
unmet_dep_count = 0;
|
||||
memset( unmet_dependencies, 0, sizeof( unmet_dependencies ) );
|
||||
missing_unmet_dependencies = 0;
|
||||
|
||||
if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
|
||||
break;
|
||||
|
@ -409,6 +411,10 @@ int main(int argc, const char *argv[])
|
|||
}
|
||||
unmet_dep_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
missing_unmet_dependencies = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -468,11 +474,14 @@ int main(int argc, const char *argv[])
|
|||
unmet_dependencies[i]);
|
||||
free(unmet_dependencies[i]);
|
||||
}
|
||||
if( missing_unmet_dependencies )
|
||||
mbedtls_fprintf( stdout, "..." );
|
||||
}
|
||||
mbedtls_fprintf( stdout, "\n" );
|
||||
fflush( stdout );
|
||||
|
||||
unmet_dep_count = 0;
|
||||
missing_unmet_dependencies = 0;
|
||||
}
|
||||
else if( ret == DISPATCH_TEST_SUCCESS )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue