[PATCH v2 14/40] test: Move dm_scan_plat() to test_pre_run()
Simon Glass
sjg at chromium.org
Sun Jan 31 04:32:22 CET 2021
Move this step over to the pre-run function.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
test/dm/test-dm.c | 2 --
test/test-main.c | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c
index 3f76a1dc2c2..65b89dbb936 100644
--- a/test/dm/test-dm.c
+++ b/test/dm/test-dm.c
@@ -73,8 +73,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 bd2f08a2b42..fe96d739dc4 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));
--
2.30.0.365.g02bc693789-goog
More information about the U-Boot
mailing list