summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-01-20 14:26:02 -0700
committerTom Rini <trini@konsulko.com>2025-01-24 14:34:41 -0600
commit6d97c98095a11ca104a8ea7a560469ae7e2c2bd0 (patch)
tree91cb260343ddd955b05442f5b529a3128554e26b /include/test
parent15c39587cf8a977df33aba37715b6ce3e17536d7 (diff)
test: Record and show the totals for all test runs
With 'ut all' multiple test suites are run. Add a way to collect totals and show them at the end. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/test.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h
index f7087ab4eea..bac43c81d63 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -27,6 +27,8 @@ struct ut_stats {
* struct unit_test_state - Entire state of test system
*
* @cur: Statistics for the current run
+ * @total: Statistics for all test runs
+ * @run_count: Number of times ut_run_list() has been called
* @start: Store the starting mallinfo when doing leak test
* @of_live: true to use livetree if available, false to use flattree
* @of_root: Record of the livetree root node (used for setting up tests)
@@ -48,6 +50,8 @@ struct ut_stats {
*/
struct unit_test_state {
struct ut_stats cur;
+ struct ut_stats total;
+ int run_count;
struct mallinfo start;
struct device_node *of_root;
bool of_live;