]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Move dm_extended_scan() to test_pre_run()
authorSimon Glass <sjg@chromium.org>
Mon, 8 Mar 2021 00:34:50 +0000 (17:34 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 12 Mar 2021 14:57:29 +0000 (09:57 -0500)
Move this step over to the pre-run function.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/dm/test-dm.c
test/test-main.c

index 69a0349d04ca9af3f6b9611c3a85600cd672326f..4cb0da13b7cb04409bdc26cb9059c11444ad01d2 100644 (file)
@@ -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));
 
index 9c6000947409b6ac3fb65fddb04ae4443b22a807..a971fe0e9c86771698b2153b9a5729af84624c57 100644 (file)
@@ -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();