summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
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:05:20 +0000
commitf8d7db1905902c048d22c86ecddd1be98419bbaf (patch)
treeb1b237d11f714606c029d07d8db18209eb05293a /meta/classes/testimage.bbclass
parent8970ed4b1fd5673fd3472934a000d10bcce297c2 (diff)
downloadpoky-f8d7db1905902c048d22c86ecddd1be98419bbaf.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] (From OE-Core rev: 8c7335290cb00ed0683241249297ca573ebd353a) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-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):
243 test_modules = d.getVar('TEST_SUITES') 243 test_modules = d.getVar('TEST_SUITES')
244 tc.loadTests(test_paths, modules=test_modules) 244 tc.loadTests(test_paths, modules=test_modules)
245 245
246 package_extraction(d, tc.suites)
247
246 bootparams = None 248 bootparams = None
247 if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd': 249 if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd':
248 bootparams = 'systemd.log_level=debug systemd.log_target=console' 250 bootparams = 'systemd.log_level=debug systemd.log_target=console'
@@ -337,12 +339,22 @@ def create_rpm_index(d):
337 if result: 339 if result:
338 bb.fatal('%s' % ('\n'.join(result))) 340 bb.fatal('%s' % ('\n'.join(result)))
339 341
342def package_extraction(d, test_suites):
343 from oeqa.utils.package_manager import find_packages_to_extract
344 from oeqa.utils.package_manager import extract_packages
345
346 test_create_extract_dirs(d)
347 packages = find_packages_to_extract(test_suites)
348 extract_packages(d, packages)
349
340def test_create_extract_dirs(d): 350def test_create_extract_dirs(d):
341 install_path = d.getVar("TEST_INSTALL_TMP_DIR") 351 install_path = d.getVar("TEST_INSTALL_TMP_DIR")
342 package_path = d.getVar("TEST_PACKAGED_DIR") 352 package_path = d.getVar("TEST_PACKAGED_DIR")
343 extracted_path = d.getVar("TEST_EXTRACTED_DIR") 353 extracted_path = d.getVar("TEST_EXTRACTED_DIR")
344 bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR")) 354 bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR"))
355 bb.utils.remove(install_path, recurse=True)
345 bb.utils.remove(package_path, recurse=True) 356 bb.utils.remove(package_path, recurse=True)
357 bb.utils.remove(extracted_path, recurse=True)
346 bb.utils.mkdirhier(install_path) 358 bb.utils.mkdirhier(install_path)
347 bb.utils.mkdirhier(package_path) 359 bb.utils.mkdirhier(package_path)
348 bb.utils.mkdirhier(extracted_path) 360 bb.utils.mkdirhier(extracted_path)