mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 23:11:32 +02:00
test: Use ut_run_test() to run driver model tests
Instead of having a separate function for running driver model tests, use the common one. Make the pre/post-run functions private since we don't need these outside of test-main.c Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -25,17 +25,8 @@ struct unit_test_state global_dm_test_state;
|
||||
static int dm_do_test(struct unit_test_state *uts, struct unit_test *test,
|
||||
bool of_live)
|
||||
{
|
||||
const char *fname = strrchr(test->file, '/') + 1;
|
||||
|
||||
printf("Test: %s: %s%s\n", test->name, fname,
|
||||
!of_live ? " (flat tree)" : "");
|
||||
uts->of_live = of_live;
|
||||
|
||||
ut_assertok(test_pre_run(uts, test));
|
||||
|
||||
test->func(uts);
|
||||
|
||||
ut_assertok(test_post_run(uts, test));
|
||||
ut_assertok(ut_run_test(uts, test, test->name));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user