aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass2023-07-12 09:04:30 -0600
committerBin Meng2023-07-16 23:13:17 +0800
commit6ec5178c0ef7c336ac41335aedc63f7f080a11a6 (patch)
tree01c472fa7dfec35302eb17a1fc36ca853e03b15e /test
parente6e67bb9e0a40f3eb3c87d16935192821987c3e0 (diff)
test: Skip flat-tree tests if devicetree is not used
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>
Diffstat (limited to 'test')
-rw-r--r--test/test-main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test-main.c b/test/test-main.c
index 2a3b2ba364a..778bf0a18a0 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -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)) &&