From: Simon Glass Date: Mon, 8 Mar 2021 00:34:52 +0000 (-0700) Subject: test: Move dm_scan_plat() to test_pre_run() X-Git-Tag: v2025.01-rc5-pxa1908~1941^2~10^2~25 X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=5a986f3feef7ce7f14282f0c6ed2f6c63647a821;p=u-boot.git test: Move dm_scan_plat() to test_pre_run() Move this step over to the pre-run function. Signed-off-by: Simon Glass --- diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index c2e1a1b920..18877c7ae5 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -74,8 +74,6 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, ut_assertok(dm_test_init(uts, of_live)); uts->start = mallinfo(); - if (test->flags & UT_TESTF_SCAN_PDATA) - ut_assertok(dm_scan_plat(false)); ut_assertok(test_pre_run(uts, test)); diff --git a/test/test-main.c b/test/test-main.c index bd2f08a2b4..fe96d739dc 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -34,6 +34,9 @@ int test_pre_run(struct unit_test_state *uts, struct unit_test *test) if (!(test->flags & UT_TESTF_DM)) uts->start = mallinfo(); + if (test->flags & UT_TESTF_SCAN_PDATA) + ut_assertok(dm_scan_plat(false)); + if (test->flags & UT_TESTF_PROBE_TEST) ut_assertok(do_autoprobe(uts));