has_feature() should be splitting the feature string into substrings and
then looking for membership instead of looking for simple substrings.

has_machine() should be using equality instead of substrings.

Signed-off-by: Ross Burton <[email protected]>
---
 meta/lib/oeqa/core/decorator/data.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/core/decorator/data.py 
b/meta/lib/oeqa/core/decorator/data.py
index bc4939e87c5..12197be246e 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -13,8 +13,8 @@ def has_feature(td, feature):
         Checks for feature in DISTRO_FEATURES or IMAGE_FEATURES.
     """
 
-    if (feature in td.get('DISTRO_FEATURES', '') or
-        feature in td.get('IMAGE_FEATURES', '')):
+    if (feature in td.get('DISTRO_FEATURES', '').split() or
+        feature in td.get('IMAGE_FEATURES', '').split()):
         return True
     return False
 
@@ -23,7 +23,7 @@ def has_machine(td, machine):
         Checks for MACHINE.
     """
 
-    if (machine in td.get('MACHINE', '')):
+    if (machine == td.get('MACHINE', '')):
         return True
     return False
 
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163856): 
https://lists.openembedded.org/g/openembedded-core/message/163856
Mute This Topic: https://lists.openembedded.org/mt/90161350/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to