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/test/ut.c b/test/ut.c
index 7454da3..a16fdfb 100644
--- a/test/ut.c
+++ b/test/ut.c
@@ -21,7 +21,7 @@
{
gd->flags &= ~(GD_FLG_SILENT | GD_FLG_RECORD);
printf("%s:%d, %s(): %s\n", fname, line, func, cond);
- uts->fail_count++;
+ uts->cur.fail_count++;
}
void ut_failf(struct unit_test_state *uts, const char *fname, int line,
@@ -35,7 +35,7 @@
vprintf(fmt, args);
va_end(args);
putc('\n');
- uts->fail_count++;
+ uts->cur.fail_count++;
}
ulong ut_check_free(void)