diff options
author | Corneliu Stoicescu <corneliux.stoicescu@intel.com> | 2014-08-26 13:05:42 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-27 12:12:06 +0100 |
commit | cd342b399b2d78724032cdd7042968d3238cd548 (patch) | |
tree | 63003146a8b1abbb6ee23725b90549fa5a38ed36 /meta/classes/testimage.bbclass | |
parent | 3d42fd1f050a1382b15c3c4d59fd02d0ed7091b2 (diff) | |
download | openembedded-core-cd342b399b2d78724032cdd7042968d3238cd548.tar.gz openembedded-core-cd342b399b2d78724032cdd7042968d3238cd548.tar.bz2 openembedded-core-cd342b399b2d78724032cdd7042968d3238cd548.zip |
classes/testimage.bbclass: add more fields to the sdk TestContext
In order to use hasFeature and hasPackage methods in sdk test modules, we need specific fields to be set in the TestContext object.
Adding pkgmanifest, imagefeatures and distrofeatures to the TestContext.
Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r-- | meta/classes/testimage.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 97d0380153..f2480fe085 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -281,6 +281,14 @@ def testsdk_main(d): self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files") self.sdktestdir = sdktestdir self.sdkenv = sdkenv + self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() + self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() + manifest = os.path.join(d.getVar("SDK_MANIFEST", True)) + try: + with open(manifest) as f: + self.pkgmanifest = f.read() + except IOError as e: + bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e) # test context tc = TestContext() |