]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Skip flat-tree tests if devicetree is not used
authorSimon Glass <sjg@chromium.org>
Wed, 12 Jul 2023 15:04:30 +0000 (09:04 -0600)
committerBin Meng <bmeng@tinylab.org>
Sun, 16 Jul 2023 15:13:17 +0000 (23:13 +0800)
Many tests don't actually use the devicetree at all so there is no point
in running the tests both with livetree and flat tree. Check for this and
skip the flat tree test in that case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
test/test-main.c

index 2a3b2ba364a801b81b10729522a9db7888168f28..778bf0a18a0f493236294f9a0da25b70dd2f2994 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_LIVE_TREE) &&
+       if ((test->flags & UT_TESTF_SCAN_FDT) &&
+           !(test->flags & UT_TESTF_LIVE_TREE) &&
            (CONFIG_IS_ENABLED(OFNODE_MULTI_TREE) ||
             !(test->flags & UT_TESTF_OTHER_FDT)) &&
            (!runs || ut_test_run_on_flattree(test)) &&