From 94b5284398e52c44bde977aa8b1fa1f5992955a2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 20 Jan 2025 14:25:26 -0700 Subject: 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 --- arch/sandbox/cpu/spl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/sandbox/cpu/spl.c') diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 7056cfd0180..0ad23e4ba95 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -147,10 +147,13 @@ void spl_board_init(void) if (state->run_unittests) { struct unit_test *tests = UNIT_TEST_ALL_START(); const int count = UNIT_TEST_ALL_COUNT(); + struct unit_test_state uts; int ret; - ret = ut_run_list("spl", NULL, tests, count, + ut_init_state(&uts); + ret = ut_run_list(&uts, "spl", NULL, tests, count, state->select_unittests, 1, false, NULL); + ut_uninit_state(&uts); /* continue execution into U-Boot */ } } -- cgit v1.2.3