summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-08-29 10:56:29 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-04 11:03:55 +0100
commita7e6de171657c6f3fc8e90b21b9ec4bad929439c (patch)
tree65dcfbd637144f87eae4b1fc6cf5dea6cf7cbaed /meta/lib/oeqa/sdk
parent5e3a07180b7357c780b76a1feec1785b33603aeb (diff)
downloadpoky-a7e6de171657c6f3fc8e90b21b9ec4bad929439c.tar.gz
sdk/context.py: add ability to check for multilib version of target package
Add a named argument 'multilib' for the hasTargetPackage function. Its default value is False. When setting to True, it will try to get the correct multilib prefix from the sdk_env, the environment setup script. We need this because we don't want unexpected run of some sdk test cases. The following steps will generate error. 1. Enable multilib for qemux86-64 require conf/multilib.conf MULTILIBS ?= "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32" 2. bitbake core-image-sato -c populate_sdk 3. bitbake core-image-sato -c testsdk The error message is like below. No package 'gtk+-3.0' found RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: FAILED As we don't have lib32-gtk+3 installed, the test case should be skipped when testing against the lib32 environment setup script. (From OE-Core rev: 163764ad4760a5fabf65640df5f968be98ad13d2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk')
-rw-r--r--meta/lib/oeqa/sdk/context.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index 7c091c0534..ec8972d05a 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -29,7 +29,13 @@ class OESDKTestContext(OETestContext):
29 def hasHostPackage(self, pkg): 29 def hasHostPackage(self, pkg):
30 return self._hasPackage(self.host_pkg_manifest, pkg) 30 return self._hasPackage(self.host_pkg_manifest, pkg)
31 31
32 def hasTargetPackage(self, pkg): 32 def hasTargetPackage(self, pkg, multilib=False):
33 if multilib:
34 # match multilib according to sdk_env
35 mls = self.td.get('MULTILIB_VARIANTS', '').split()
36 for ml in mls:
37 if ('ml'+ml) in self.sdk_env:
38 pkg = ml + '-' + pkg
33 return self._hasPackage(self.target_pkg_manifest, pkg) 39 return self._hasPackage(self.target_pkg_manifest, pkg)
34 40
35class OESDKTestContextExecutor(OETestContextExecutor): 41class OESDKTestContextExecutor(OETestContextExecutor):