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]

(From OE-Core rev: f07045fcae859c902434062d1725f1348f42d1dd)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Costin Constantin 2015-08-21 14:37:49 +03:00 committed by Richard Purdie
parent 315fb4c9e2
commit 393bd7496d
1 changed files with 3 additions and 3 deletions

View 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