[oe-commits] [openembedded-core] 02/51: sdk/context.py: add ability to check for multilib version of target package
git at git.openembedded.org
git at git.openembedded.org
Thu Aug 30 15:20:41 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 163764ad4760a5fabf65640df5f968be98ad13d2
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Wed Aug 29 10:56:29 2018 +0800
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.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/sdk/context.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index 7c091c0..ec8972d 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -29,7 +29,13 @@ class OESDKTestContext(OETestContext):
def hasHostPackage(self, pkg):
return self._hasPackage(self.host_pkg_manifest, pkg)
- def hasTargetPackage(self, pkg):
+ def hasTargetPackage(self, pkg, multilib=False):
+ if multilib:
+ # match multilib according to sdk_env
+ mls = self.td.get('MULTILIB_VARIANTS', '').split()
+ for ml in mls:
+ if ('ml'+ml) in self.sdk_env:
+ pkg = ml + '-' + pkg
return self._hasPackage(self.target_pkg_manifest, pkg)
class OESDKTestContextExecutor(OETestContextExecutor):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list