[oe-commits] Costin Constantin : oeqa/oetest.py: add better package search for hasPackage()

git at git.openembedded.org git at git.openembedded.org
Wed Aug 26 07:29:13 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: f07045fcae859c902434062d1725f1348f42d1dd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f07045fcae859c902434062d1725f1348f42d1dd

Author: Costin Constantin <costin.c.constantin at intel.com>
Date:   Fri Aug 21 14:37:49 2015 +0300

oeqa/oetest.py: add better package search for hasPackage()

Modified hasPackage() to split the content of pacakage manifest file
in containing lines and search at the begining of each line the
existance of the needed pkg.

[YOCTO #8170]

Signed-off-by: Costin Constantin <costin.c.constantin at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/oetest.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index dfed3de..b6d2a2c 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -99,9 +99,9 @@ class oeTest(unittest.TestCase):
 
     @classmethod
     def hasPackage(self, pkg):
-
-        if re.search(pkg, oeTest.tc.pkgmanifest):
-            return True
+        for item in oeTest.tc.pkgmanifest.split('\n'):
+            if re.match(pkg, item):
+                return True
         return False
 
     @classmethod



More information about the Openembedded-commits mailing list