aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass2021-03-07 17:35:02 -0700
committerTom Rini2021-03-12 09:57:30 -0500
commitc169d542bbecb02b04e39ed3424a88a0bd0b7620 (patch)
tree0864a420a4a1724992ae1bcc646874dff4978b17
parentca44ca0556a29934de6356cd70a1b10f9a13c15c (diff)
test: Drop dm_do_test()
In an effort to make use of a common test runner, use ut_run_test() directly to run driver model tests. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--test/dm/test-dm.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c
index b01123c7409..de41fc09db0 100644
--- a/test/dm/test-dm.c
+++ b/test/dm/test-dm.c
@@ -22,15 +22,6 @@ DECLARE_GLOBAL_DATA_PTR;
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)
-{
- uts->of_live = of_live;
- ut_assertok(ut_run_test(uts, test, test->name));
-
- return 0;
-}
-
/**
* dm_test_run_on_flattree() - Check if we should run a test with flat DT
*
@@ -103,7 +94,8 @@ int dm_test_run(const char *test_name)
runs = 0;
if (CONFIG_IS_ENABLED(OF_LIVE)) {
if (!(test->flags & UT_TESTF_FLAT_TREE)) {
- ut_assertok(dm_do_test(uts, test, true));
+ uts->of_live = true;
+ ut_assertok(ut_run_test(uts, test, test->name));
runs++;
}
}
@@ -114,7 +106,8 @@ int dm_test_run(const char *test_name)
*/
if (!(test->flags & UT_TESTF_LIVE_TREE) &&
(!runs || dm_test_run_on_flattree(test))) {
- ut_assertok(dm_do_test(uts, test, false));
+ uts->of_live = false;
+ ut_assertok(ut_run_test(uts, test, test->name));
runs++;
}
found++;