test: Move stats into a struct

Use a struct to hold the stats, since we also want to have the same
stats for all runs as we have for each suite.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/test/test.h b/include/test/test.h
index 21c0478..bc8f0bb 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -9,11 +9,21 @@
 #include <malloc.h>
 #include <linux/bitops.h>
 
-/*
- * struct unit_test_state - Entire state of test system
+/**
+ * struct ut_stats - Statistics about tests run
  *
  * @fail_count: Number of tests that failed
  * @skip_count: Number of tests that were skipped
+ */
+struct ut_stats {
+	int fail_count;
+	int skip_count;
+};
+
+/*
+ * struct unit_test_state - Entire state of test system
+ *
+ * @cur: Statistics for the current run
  * @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)
@@ -34,8 +44,7 @@
  * @actual_str: Temporary string used to hold actual string value
  */
 struct unit_test_state {
-	int fail_count;
-	int skip_count;
+	struct ut_stats cur;
 	struct mallinfo start;
 	struct device_node *of_root;
 	bool of_live;