aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-11-13 15:22:24 +0800
committerRobert Yang <liezhi.yang@windriver.com>2017-11-14 15:55:45 +0800
commit480b881c0ad08618fbc5e9d9d0de4bf6da5dc26d (patch)
treef6b99a660ce8532e467687992769945d5818b2af
parenta17f3ec910366e9e7551fa24fbc07929b9584341 (diff)
downloadopenembedded-core-contrib-480b881c0ad08618fbc5e9d9d0de4bf6da5dc26d.tar.gz
openembedded-core-contrib-480b881c0ad08618fbc5e9d9d0de4bf6da5dc26d.tar.bz2
openembedded-core-contrib-480b881c0ad08618fbc5e9d9d0de4bf6da5dc26d.zip
oeqa: make OEHasPackage() check multilib package
Make OEHasPackage() check multilib package when test multilib image, for example, OEHasPackage(['dnf']) should check lib32-dnf when test lib32-core-image-sato, this can make "bitbake lib32-core-image-sato -ctestimage" work, otherwise the testcases would be skipped. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/lib/oeqa/runtime/decorator/package.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/decorator/package.py b/meta/lib/oeqa/runtime/decorator/package.py
index aa6ecb68fa4..1a8bc0099e2 100644
--- a/meta/lib/oeqa/runtime/decorator/package.py
+++ b/meta/lib/oeqa/runtime/decorator/package.py
@@ -32,11 +32,20 @@ class OEHasPackage(OETestDecorator):
need_pkgs = set()
unneed_pkgs = set()
pkgs = strToSet(self.need_pkgs)
+ # Conver to multilib
+ mlprefix = self.case.tc.td['MLPREFIX']
for pkg in pkgs:
if pkg.startswith('!'):
- unneed_pkgs.add(pkg[1:])
+ pkg_name = pkg[1:]
+ if mlprefix and not pkg_name.startswith(mlprefix):
+ unneed_pkgs.add('%s%s' % (mlprefix, pkg_name))
+ else:
+ unneed_pkgs.add(pkg_name)
else:
- need_pkgs.add(pkg)
+ if mlprefix and not pkg.startswith(mlprefix):
+ need_pkgs.add('%s%s' % (mlprefix, pkg))
+ else:
+ need_pkgs.add(pkg)
if unneed_pkgs:
msg = 'Checking if %s is not installed' % ', '.join(unneed_pkgs)