summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/oetest.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r--meta/lib/oeqa/oetest.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 3bb3589468..95661506e3 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -56,17 +56,11 @@ class oeTest(unittest.TestCase):
56 56
57 @classmethod 57 @classmethod
58 def hasPackage(self, pkg): 58 def hasPackage(self, pkg):
59 59 manifest = os.path.join(oeTest.tc.d.getVar("DEPLOY_DIR_IMAGE", True), oeTest.tc.d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
60 pkgfile = os.path.join(oeTest.tc.d.getVar("WORKDIR", True), "installed_pkgs.txt") 60 with open(manifest) as f:
61 61 data = f.read()
62 with open(pkgfile) as f: 62 if re.search(pkg, data):
63 data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
64 match = re.search(pkg, data)
65 data.close()
66
67 if match:
68 return True 63 return True
69
70 return False 64 return False
71 65
72 @classmethod 66 @classmethod