]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
test: Fix SPL tests not being run
authorSean Anderson <sean.anderson@seco.com>
Fri, 29 Sep 2023 16:06:54 +0000 (12:06 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 9 Oct 2023 19:24:31 +0000 (15:24 -0400)
SPL doesn't have OF_LIVE enabled, so we can only run tests with a flat
tree. Don't skip them even if they don't use the devicetree.

Fixes: 6ec5178c0ef ("test: Skip flat-tree tests if devicetree is not used")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/test-main.c

index 778bf0a18a0f493236294f9a0da25b70dd2f2994..edb20bc4b9cc19fe1985655f5845460fb75a9292 100644 (file)
@@ -476,7 +476,8 @@ static int ut_run_test_live_flat(struct unit_test_state *uts,
         *   (for sandbox we handle this by copying the tree, but not for other
         *    boards)
         */
-       if ((test->flags & UT_TESTF_SCAN_FDT) &&
+       if ((!CONFIG_IS_ENABLED(OF_LIVE) ||
+            (test->flags & UT_TESTF_SCAN_FDT)) &&
            !(test->flags & UT_TESTF_LIVE_TREE) &&
            (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) ||
             !(test->flags & UT_TESTF_OTHER_FDT)) &&