Skip to content

Commit

Permalink
test: Skip flat-tree tests if devicetree is not used
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
  • Loading branch information
sjg20 authored and lbmeng committed Jul 16, 2023
1 parent e6e67bb commit 6ec5178
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) &&
Expand Down

0 comments on commit 6ec5178

Please sign in to comment.