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

@@ -132,7 +132,8 @@ static int run_suite(struct unit_test_state *uts, struct suite *ste,
snprintf(prefix, sizeof(prefix), "%s_test_", ste->name);
ret = ut_run_list(uts, ste->name, prefix, ste->start, n_ents,
select_name, runs_per_test, force_run, test_insert);
select_name, runs_per_test, force_run, test_insert,
0, NULL);
return ret;
}