test: Add support for passing arguments to C tests

Add support for passing key=value arguments to unit tests. The test
framework parses arguments based on definitions provided by each test
and makes them available via uts->args[]

For now the 'ut' command does not support this new feature.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-12-12 14:24:13 -07:00
parent 1e4f459e48
commit a3b60a2094
5 changed files with 178 additions and 7 deletions

View File

@@ -152,7 +152,8 @@ void spl_board_init(void)
ut_init_state(&uts);
ret = ut_run_list(&uts, "spl", NULL, tests, count,
state->select_unittests, 1, false, NULL);
state->select_unittests, 1, false, NULL,
0, NULL);
ut_report(&uts.cur, 1);
ut_uninit_state(&uts);
/* continue execution into U-Boot */