[PATCH v5 14/41] test: Move dm_extended_scan() to test_pre_run()
Simon Glass
sjg at chromium.org
Mon Mar 8 01:34:50 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 | 3 ---
test/test-main.c | 7 +++++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c
index 69a0349d04c..4cb0da13b7c 100644
--- a/test/dm/test-dm.c
+++ b/test/dm/test-dm.c
@@ -93,9 +93,6 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test,
ut_assertok(dm_scan_plat(false));
if (test->flags & UT_TESTF_PROBE_TEST)
ut_assertok(do_autoprobe(uts));
- if (!CONFIG_IS_ENABLED(OF_PLATDATA) &&
- (test->flags & UT_TESTF_SCAN_FDT))
- ut_assertok(dm_extended_scan(false));
ut_assertok(test_pre_run(uts, test));
diff --git a/test/test-main.c b/test/test-main.c
index 9c600094740..a971fe0e9c8 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -6,7 +6,10 @@
#include <common.h>
#include <console.h>
+#include <dm.h>
+#include <dm/root.h>
#include <test/test.h>
+#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -16,6 +19,10 @@ int test_pre_run(struct unit_test_state *uts, struct unit_test *test)
if (!(test->flags & UT_TESTF_DM))
uts->start = mallinfo();
+ if (!CONFIG_IS_ENABLED(OF_PLATDATA) &&
+ (test->flags & UT_TESTF_SCAN_FDT))
+ ut_assertok(dm_extended_scan(false));
+
if (test->flags & UT_TESTF_CONSOLE_REC) {
int ret = console_record_reset_enable();
--
2.30.1.766.gb4fecdf3b7-goog
More information about the U-Boot
mailing list