sanitycheck: fix depends_on when multiple dependencies

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 <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-07-07 08:05:48 -05:00 committed by Kumar Gala
commit 5141d526b3

View file

@ -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
@ -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"