Add summary data to unit test output
This change causes summary data to be added to the unit test
data that is generated. Summary data lists counts for the total
tests, test passed and test failed in addition th to the information
which was previously generated.
Issue-ID: RIC-646
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: Ibeda3418291c490d49f9e8a29b89c93aa55567fb
diff --git a/test/tools_test.c b/test/tools_test.c
index fb6aafa..70cce44 100644
--- a/test/tools_test.c
+++ b/test/tools_test.c
@@ -51,7 +51,18 @@
#include "tools_static_test.c"
int main( ) {
+ int errors = 0;
+
fprintf( stderr, ">>>> starting tools_test\n" );
- return tools_test() > 0;
+ errors += tools_test() > 0;
+
+ test_summary( errors, "tool tests" );
+ if( errors == 0 ) {
+ fprintf( stderr, "<PASS> all tool tests were OK\n\n" );
+ } else {
+ fprintf( stderr, "<FAIL> %d errors in tool code\n\n", errors );
+ }
+
+ return !!errors;
}