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: if set(plat.ignore_tags) & tc.tags:
continue continue
if tc.depends_on and not tc.depends_on.intersection(set(plat.supported)): if tc.depends_on:
continue dep_intersection = tc.depends_on.intersection(set(plat.supported))
if dep_intersection != set(tc.depends_on):
continue
if plat.flash < tc.min_flash: if plat.flash < tc.min_flash:
continue continue
@ -1485,9 +1487,11 @@ class TestSuite:
discards[instance] = "Not enough RAM" discards[instance] = "Not enough RAM"
continue continue
if tc.depends_on and not tc.depends_on.intersection(set(plat.supported)): if tc.depends_on:
discards[instance] = "No hardware support" dep_intersection = tc.depends_on.intersection(set(plat.supported))
continue if dep_intersection != set(tc.depends_on):
discards[instance] = "No hardware support"
continue
if plat.flash< tc.min_flash: if plat.flash< tc.min_flash:
discards[instance] = "Not enough FLASH" discards[instance] = "Not enough FLASH"