From 15c39587cf8a977df33aba37715b6ce3e17536d7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 20 Jan 2025 14:26:01 -0700 Subject: 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 --- include/test/ut.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/test') diff --git a/include/test/ut.h b/include/test/ut.h index a51defc3b90..be5502e03a1 100644 --- a/include/test/ut.h +++ b/include/test/ut.h @@ -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 -- cgit v1.2.3