aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2017-01-09 14:49:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:03:57 +0000
commit8c7335290cb00ed0683241249297ca573ebd353a (patch)
tree7cf2e8e23ea5f3ca775256e1e4ecae0bc56a231d /meta/classes
parent11dd49cb9faaf6588f045083ab5bd6679e2eafc1 (diff)
downloadopenembedded-core-8c7335290cb00ed0683241249297ca573ebd353a.tar.gz
testimage.bbclass: Add support for package extraction
testimage support the installation of packages without a package manager in the target. This adds support for package extraction required to support the installation feature. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/testimage.bbclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index abcecca472..1dfbc490de 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -243,6 +243,8 @@ def testimage_main(d):
test_modules = d.getVar('TEST_SUITES')
tc.loadTests(test_paths, modules=test_modules)
+ package_extraction(d, tc.suites)
+
bootparams = None
if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd':
bootparams = 'systemd.log_level=debug systemd.log_target=console'
@@ -337,12 +339,22 @@ def create_rpm_index(d):
if result:
bb.fatal('%s' % ('\n'.join(result)))
+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)
+ 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)