summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
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)