test: Pass the test state to cmd_ut_category()

Update this function to access a unit-test state, so that the caller can
collect results from running multiple suites.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-01-24 14:34:41 -06:00
committed by Tom Rini
parent 374203bd2e
commit bbff0b165c
4 changed files with 38 additions and 36 deletions
+4 -3
View File
@@ -94,7 +94,8 @@ void bootstd_reset_usb(void)
usb_started = false;
}
int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
int do_ut_bootstd(struct unit_test_state *uts, struct cmd_tbl *cmdtp, int flag,
int argc, char *const argv[])
{
struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd);
const int n_ents = UNIT_TEST_SUITE_COUNT(bootstd);
@@ -106,6 +107,6 @@ int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return CMD_RET_FAILURE;
}
return cmd_ut_category("bootstd", "bootstd_", tests, n_ents,
argc, argv);
return cmd_ut_category(uts, "bootstd", "bootstd_",
tests, n_ents, argc, argv);
}