aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-07 17:35:01 -0700
committerTom Rini <trini@konsulko.com>2021-03-12 09:57:30 -0500
commitca44ca0556a29934de6356cd70a1b10f9a13c15c (patch)
tree915c94e387f6f32330070c14dea900a33daf7104 /test/dm
parent99a88fe1bd98ad800ec0460e3174c2a846a991fe (diff)
downloadu-boot-ca44ca0556a29934de6356cd70a1b10f9a13c15c.zip
u-boot-ca44ca0556a29934de6356cd70a1b10f9a13c15c.tar.gz
u-boot-ca44ca0556a29934de6356cd70a1b10f9a13c15c.tar.bz2
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>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/test-dm.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c
index df93839..b01123c 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;
}