test: Move stat-printing into its own function

Add a function to show the stats, so we can decide when to print it.

This slightly adjusts the output, so that any 'test not found' message
appears on its own line after all other output.

The 'failures' message now appears in lower case so update pytest
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-01-20 14:26:01 -07:00
committed by Tom Rini
parent 561320beff
commit 15c39587cf
8 changed files with 27 additions and 10 deletions

View File

@@ -530,4 +530,12 @@ int ut_run_list(struct unit_test_state *uts, const char *category,
const char *select_name, int runs_per_test, bool force_run,
const char *test_insert);
/**
* ut_report() - Report stats on a test run
*
* @stats: Stats to show
* @run_count: Number of suites that were run
*/
void ut_report(struct ut_stats *stats, int run_count);
#endif