From ca44ca0556a29934de6356cd70a1b10f9a13c15c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 7 Mar 2021 17:35:01 -0700 Subject: 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 --- test/dm/test-dm.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'test/dm/test-dm.c') diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index df938395bb..b01123c740 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -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; } -- cgit v1.2.3