fixes for lib32-image -ctestimage
cover fixes for lib32-image -ctestimage
The following changes since commit a17f3ec910366e9e7551fa24fbc07929b9584341:
dhcp: fix build issue with libxml2 support (2017-11-10 14:44:31 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/mlqa
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/mlqa
Robert Yang (2):
oeqa: make OEHasPackage() check multilib package oeqa/dnf.py/rpm.py: add MLPREFIX to package name
meta/lib/oeqa/runtime/cases/dnf.py | 4 ++-- meta/lib/oeqa/runtime/cases/rpm.py | 2 +- meta/lib/oeqa/runtime/decorator/package.py | 13 +++++++++++-- 3 files changed, 14 insertions(+), 5 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 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.
--- meta/lib/oeqa/runtime/decorator/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
meta/lib/oeqa/runtime/decorator/package.py +11 -2
@@ -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)
Signature · 1 line
2.7.4
PATCH 2/2 oeqa/dnf.py/rpm.py: add MLPREFIX to package name
In reply to Robert YangThe package name is lib32-foo (e.g., lib32-dnf) when run
"bitbake lib32-core-image-sato -ctestimage", add MLPREFIX to package name can fix the problem, otherwise the test cases would be failed.
--- meta/lib/oeqa/runtime/cases/dnf.py | 4 ++-- meta/lib/oeqa/runtime/cases/rpm.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/lib/oeqa/runtime/cases/dnf.py +2 -2
@@ -38,12 +38,12 @@ class DnfBasicTest(DnfTest): @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) @OETestID(1737) def test_dnf_info(self): - self.dnf('info dnf') + self.dnf('info %sdnf' % self.tc.td['MLPREFIX']) @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) @OETestID(1738) def test_dnf_search(self): - self.dnf('search dnf') + self.dnf('search %sdnf' % self.tc.td['MLPREFIX']) @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) @OETestID(1736)
meta/lib/oeqa/runtime/cases/rpm.py +1 -1
@@ -25,7 +25,7 @@ class RpmBasicTest(OERuntimeTestCase): @OETestID(191) @OETestDepends(['rpm.RpmBasicTest.test_rpm_help']) def test_rpm_query(self): - status, output = self.target.run('rpm -q rpm') + status, output = self.target.run('rpm -q %srpm' % self.tc.td['MLPREFIX']) msg = 'status and output: %s and %s' % (status, output) self.assertEqual(status, 0, msg=msg)
Signature · 1 line
2.7.4