diff options
author | Ross Burton <ross@burtonini.com> | 2022-03-31 19:29:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-01 23:05:31 +0100 |
commit | a4c63819234e252c58e040af8bbdbfb96b6feccf (patch) | |
tree | 0004cfa0060b1a5f188e39a65cfa70ff8b08613b /meta/lib | |
parent | 7ef7b03eeefc0a9911fd62c73e346fa5aeeb09eb (diff) | |
download | openembedded-core-contrib-a4c63819234e252c58e040af8bbdbfb96b6feccf.tar.gz |
oeqa/core/decorators/data: improve has_* logic
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 <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/core/decorator/data.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index bc4939e87c..12197be246 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 |