]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/oetest.py: add better package search for hasPackage()
authorCostin Constantin <costin.c.constantin@intel.com>
Fri, 21 Aug 2015 11:37:49 +0000 (14:37 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Aug 2015 07:26:37 +0000 (08:26 +0100)
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@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/oetest.py

index dfed3dea87de0a6157297d98d173dffc719391d7..b6d2a2ca6483c7d1b4cdd14aadeb4116f590b30a 100644 (file)
@@ -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