diff options
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 23a3e5d69f..0db6cb80a9 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -10,8 +10,6 @@ import os, re, mmap import unittest import inspect -import bb -from oeqa.utils.sshcontrol import SSHControl def loadTests(tc): @@ -31,15 +29,14 @@ def loadTests(tc): def runTests(tc): suite = loadTests(tc) - bb.note("Test modules %s" % tc.testslist) - bb.note("Found %s tests" % suite.countTestCases()) + print("Test modules %s" % tc.testslist) + print("Found %s tests" % suite.countTestCases()) runner = unittest.TextTestRunner(verbosity=2) result = runner.run(suite) return result - class oeTest(unittest.TestCase): longMessage = True @@ -60,18 +57,16 @@ class oeTest(unittest.TestCase): @classmethod def hasPackage(self, pkg): - manifest = os.path.join(oeTest.tc.d.getVar("DEPLOY_DIR_IMAGE", True), oeTest.tc.d.getVar("IMAGE_LINK_NAME", True) + ".manifest") - with open(manifest) as f: - data = f.read() - if re.search(pkg, data): + + if re.search(pkg, oeTest.tc.pkgmanifest): return True return False @classmethod def hasFeature(self,feature): - if feature in oeTest.tc.d.getVar("IMAGE_FEATURES", True).split() or \ - feature in oeTest.tc.d.getVar("DISTRO_FEATURES", True).split(): + if feature in oeTest.tc.imagefeatures or \ + feature in oeTest.tc.distrofeatures: return True else: return False |