diff options
author | Simon Glass <sjg@chromium.org> | 2025-01-20 14:25:26 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-24 14:34:39 -0600 |
commit | 94b5284398e52c44bde977aa8b1fa1f5992955a2 (patch) | |
tree | 639569f14c1112aaa4af1249c515d5d47982f877 /test/cmd_ut.c | |
parent | 7b576f0847659c22bd938e4f4885324f88a16e74 (diff) |
test: Pass the test-state into ut_run_list()
Pass this into the function so that callers can inspect the state
afterwards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd_ut.c')
-rw-r--r-- | test/cmd_ut.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c index a14dbf4ca5e..69f0230e556 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -21,6 +21,7 @@ int cmd_ut_category(const char *name, const char *prefix, struct unit_test *tests, int n_ents, int argc, char *const argv[]) { + struct unit_test_state uts; const char *test_insert = NULL; int runs_per_text = 1; bool force_run = false; @@ -44,9 +45,11 @@ int cmd_ut_category(const char *name, const char *prefix, argc--; } - ret = ut_run_list(name, prefix, tests, n_ents, + ut_init_state(&uts); + ret = ut_run_list(&uts, name, prefix, tests, n_ents, cmd_arg1(argc, argv), runs_per_text, force_run, test_insert); + ut_uninit_state(&uts); return ret ? CMD_RET_FAILURE : 0; } |