Make tests output more concise and clearer
Also refactor the code that generates this output.
This is only a first step, subsequent patches will further improve
the output.
Here is a sample of the old output:
[cpu 0x0000] NOTICE: Starting unittest 'Template - Single core test'
[cpu 0x0000] NOTICE: Unittest 'Template - Single core test' complete. Result: Passed
[cpu 0x0000] NOTICE: Starting unittest 'Template - Multi core test'
[cpu 0x0000] NOTICE: Unittest 'Template - Multi core test' complete. Result: Passed
========== TEST REPORT ==========
# Test suite 'Template':
- Single core test: Passed
- Multi core test: Passed
=================================
Tests Skipped : 0
Tests Passed : 2
Tests Failed : 0
Tests Crashed : 0
Total tests : 2
=================================
[cpu 0x0000] NOTICE: Exiting tests.
And now the new output:
[cpu 0x0000] --
[cpu 0x0000] Running test suite 'Template'
[cpu 0x0000] Description: Template test code
[cpu 0x0000]
[cpu 0x0000] > Executing 'Single core test'
[cpu 0x0000] TEST COMPLETE Passed
[cpu 0x0000]
[cpu 0x0000] > Executing 'Multi core test'
[cpu 0x0000] TEST COMPLETE Passed
[cpu 0x0000]
[cpu 0x0000] ******************************* Summary *******************************
[cpu 0x0000] > Test suite 'Template'
[cpu 0x0000] Passed
[cpu 0x0000] =================================
[cpu 0x0000] Tests Skipped : 0
[cpu 0x0000] Tests Passed : 2
[cpu 0x0000] Tests Failed : 0
[cpu 0x0000] Tests Crashed : 0
[cpu 0x0000] Total tests : 2
[cpu 0x0000] =================================
[cpu 0x0000] NOTICE: Exiting tests.
Change-Id: I9d52f2da8905962ab1df73d0691846d88622d3b5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
diff --git a/tftf/framework/include/tftf.h b/tftf/framework/include/tftf.h
index 8231e28..43f1e7e 100644
--- a/tftf/framework/include/tftf.h
+++ b/tftf/framework/include/tftf.h
@@ -130,7 +130,10 @@
*/
STATUS tftf_testcase_get_result(const test_case_t *testcase, TESTCASE_RESULT *result, char *test_output);
-void tftf_report_generate(void);
+void print_testsuite_start(const test_suite_t *testsuite);
+void print_test_start(const test_case_t *test);
+void print_test_end(const test_case_t *test);
+void print_tests_summary(void);
/*
* Exit the TFTF.