From 5141d526b3119936c1f5ae7e687d6d3e303e1df6 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 7 Jul 2017 08:05:48 -0500 Subject: [PATCH] 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 --- scripts/sanitycheck | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 7ea456b4a0ec2e..1428b18e5f7424 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -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"