From 393bd7496d71eb101f21234c1233a2d18fd2c73e Mon Sep 17 00:00:00 2001 From: Costin Constantin Date: Fri, 21 Aug 2015 14:37:49 +0300 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oeqa/oetest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta/lib/oeqa/oetest.py') diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index dfed3dea87..b6d2a2ca64 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 -- cgit v1.2.3-54-g00ecf