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>
diff --git a/tests/suites/host_test.function b/tests/suites/host_test.function
index aff49ca..5951e46 100644
--- a/tests/suites/host_test.function
+++ b/tests/suites/host_test.function
@@ -476,6 +476,7 @@
{
size_t unmet_dep_count = 0;
int unmet_dependencies[20];
+ int missing_unmet_dependencies = 0;
test_filename = test_files[ testfile_index ];
@@ -496,6 +497,7 @@
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
}
unmet_dep_count = 0;
+ missing_unmet_dependencies = 0;
if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
break;
@@ -527,6 +529,10 @@
unmet_dependencies[unmet_dep_count] = dep_id;
unmet_dep_count++;
}
+ else
+ {
+ missing_unmet_dependencies = 1;
+ }
}
}
@@ -595,11 +601,14 @@
mbedtls_fprintf( stdout, "%d ",
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 )
{