aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2017-01-13 10:47:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:03:57 +0000
commit077dc19445574457769eb4f231de97e8059cb75e (patch)
tree6219014f47d8737d6618a54b1df7a52ac60cd981 /meta/classes/testimage.bbclass
parent8c7335290cb00ed0683241249297ca573ebd353a (diff)
downloadopenembedded-core-contrib-077dc19445574457769eb4f231de97e8059cb75e.tar.gz
testimage.bbclass: Add package install feature
This allows to use the package install feature with the new OEQA framework. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass27
1 files changed, 10 insertions, 17 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 1dfbc490de..96e41c6c87 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -159,7 +159,6 @@ def testimage_main(d):
pn = d.getVar("PN")
bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR"))
- #test_create_extract_dirs(d)
image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
d.getVar('IMAGE_LINK_NAME')))
@@ -170,6 +169,8 @@ def testimage_main(d):
image_manifest = "%s.manifest" % image_name
image_packages = OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
+ extract_dir = d.getVar("TEST_EXTRACTED_DIR")
+
# Get machine
machine = d.getVar("MACHINE")
@@ -236,7 +237,8 @@ def testimage_main(d):
d.getVar("TEST_SERVER_IP"), **target_kwargs)
# test context
- tc = OERuntimeTestContext(td, logger, target, host_dumper, image_packages)
+ tc = OERuntimeTestContext(td, logger, target, host_dumper,
+ image_packages, extract_dir)
# Load tests before starting the target
test_paths = get_runtime_paths(d)
@@ -343,22 +345,13 @@ def package_extraction(d, test_suites):
from oeqa.utils.package_manager import find_packages_to_extract
from oeqa.utils.package_manager import extract_packages
- test_create_extract_dirs(d)
+ bb.utils.remove(d.getVar("TEST_NEEDED_PACKAGES_DIR"), recurse=True)
packages = find_packages_to_extract(test_suites)
- extract_packages(d, packages)
-
-def test_create_extract_dirs(d):
- install_path = d.getVar("TEST_INSTALL_TMP_DIR")
- package_path = d.getVar("TEST_PACKAGED_DIR")
- extracted_path = d.getVar("TEST_EXTRACTED_DIR")
- bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR"))
- bb.utils.remove(install_path, recurse=True)
- bb.utils.remove(package_path, recurse=True)
- bb.utils.remove(extracted_path, recurse=True)
- bb.utils.mkdirhier(install_path)
- bb.utils.mkdirhier(package_path)
- bb.utils.mkdirhier(extracted_path)
-
+ if packages:
+ bb.utils.mkdirhier(d.getVar("TEST_INSTALL_TMP_DIR"))
+ bb.utils.mkdirhier(d.getVar("TEST_PACKAGED_DIR"))
+ bb.utils.mkdirhier(d.getVar("TEST_EXTRACTED_DIR"))
+ extract_packages(d, packages)
testimage_main[vardepsexclude] += "BB_ORIGENV DATETIME"