[OE-core] [PATCH] oeqa/oetest.py: add better pkg. search for hasPackage()
Costin Constantin
costin.c.constantin at intel.com
Fri Aug 21 11:37:49 UTC 2015
Modified hasPackage() to split the content of pkg. 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>
---
meta/lib/oeqa/oetest.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index dfed3de..9bfc76d 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -99,10 +99,12 @@ class oeTest(unittest.TestCase):
@classmethod
def hasPackage(self, pkg):
-
- if re.search(pkg, oeTest.tc.pkgmanifest):
- return True
- return False
+ for item in oeTest.tc.pkgmanifest.split('\n'):
+ if re.match(pkg, item):
+ return True
+ break
+ else:
+ return False
@classmethod
def hasFeature(self,feature):
--
2.1.4
More information about the Openembedded-core
mailing list