From 5c4341d41e9d3a38b10c106caeda824a2b1c4eff Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 12 Jul 2023 09:04:30 -0600 Subject: [PATCH] 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 Reviewed-by: Bin Meng --- test/test-main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test-main.c b/test/test-main.c index 2a3b2ba364..778bf0a18a 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)) && -- 2.39.5