Skip to content

Commit

Permalink
sanitycheck: fix depends_on when multiple dependencies
Browse files Browse the repository at this point in the history
If the depends_on has more than one item we need to match all of those
dependencies in the supported list.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak committed Jul 7, 2017
1 parent 5f9cf75 commit 5141d52
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/sanitycheck
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,10 @@ class TestSuite:
if set(plat.ignore_tags) & tc.tags:
continue

if tc.depends_on and not tc.depends_on.intersection(set(plat.supported)):
continue
if tc.depends_on:
dep_intersection = tc.depends_on.intersection(set(plat.supported))
if dep_intersection != set(tc.depends_on):
continue

if plat.flash < tc.min_flash:
continue
Expand Down Expand Up @@ -1485,9 +1487,11 @@ class TestSuite:
discards[instance] = "Not enough RAM"
continue

if tc.depends_on and not tc.depends_on.intersection(set(plat.supported)):
discards[instance] = "No hardware support"
continue
if tc.depends_on:
dep_intersection = tc.depends_on.intersection(set(plat.supported))
if dep_intersection != set(tc.depends_on):
discards[instance] = "No hardware support"
continue

if plat.flash< tc.min_flash:
discards[instance] = "Not enough FLASH"
Expand Down

0 comments on commit 5141d52

Please sign in to comment.