[OE-core] [PATCH 1/1] pkgdata: fix test_find_path to consider multilib
Chen Qi
Qi.Chen at windriver.com
Mon Jun 17 08:32:13 UTC 2019
Fix test_find_path test case to take into consideration of multilib
being enabled. After this change, no matter multilib is enabled or
not, the test case should pass.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
meta/lib/oeqa/selftest/cases/pkgdata.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 833a180..2bd15eb 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -47,10 +47,11 @@ class OePkgdataUtilTests(OESelftestTestCase):
self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
def test_find_path(self):
- result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1')
- self.assertEqual(result.output, 'zlib: /lib/libz.so.1')
+ base_libdir = get_bb_var('base_libdir')
+ result = runCmd('oe-pkgdata-util find-path %s/libz.so.1' % base_libdir)
+ self.assertEqual(result.output, 'zlib: %s/libz.so.1' % base_libdir)
result = runCmd('oe-pkgdata-util find-path /usr/bin/m4')
- self.assertEqual(result.output, 'm4: /usr/bin/m4')
+ self.assertTrue('m4: /usr/bin/m4' in result.output)
result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True)
self.assertEqual(result.status, 1, "Status different than 1. output: %s" % result.output)
self.assertEqual(result.output, 'ERROR: Unable to find any package producing path /not/exist')
--
1.9.1
More information about the Openembedded-core
mailing list