diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2017-01-13 10:47:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:20 +0000 |
commit | 58789be270c903bf75c1946a4c626b37a5bcdc72 (patch) | |
tree | db84f05a6ab1fdeac5cdd1224558216e562f35d6 /meta/classes | |
parent | f8d7db1905902c048d22c86ecddd1be98419bbaf (diff) | |
download | poky-58789be270c903bf75c1946a4c626b37a5bcdc72.tar.gz |
testimage.bbclass: Add package install feature
This allows to use the package install feature with
the new OEQA framework.
[YOCTO #10234]
(From OE-Core rev: 077dc19445574457769eb4f231de97e8059cb75e)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/testimage.bbclass | 27 |
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): | |||
159 | pn = d.getVar("PN") | 159 | pn = d.getVar("PN") |
160 | 160 | ||
161 | bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR")) | 161 | bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR")) |
162 | #test_create_extract_dirs(d) | ||
163 | 162 | ||
164 | image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'), | 163 | image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'), |
165 | d.getVar('IMAGE_LINK_NAME'))) | 164 | d.getVar('IMAGE_LINK_NAME'))) |
@@ -170,6 +169,8 @@ def testimage_main(d): | |||
170 | image_manifest = "%s.manifest" % image_name | 169 | image_manifest = "%s.manifest" % image_name |
171 | image_packages = OERuntimeTestContextExecutor.readPackagesManifest(image_manifest) | 170 | image_packages = OERuntimeTestContextExecutor.readPackagesManifest(image_manifest) |
172 | 171 | ||
172 | extract_dir = d.getVar("TEST_EXTRACTED_DIR") | ||
173 | |||
173 | # Get machine | 174 | # Get machine |
174 | machine = d.getVar("MACHINE") | 175 | machine = d.getVar("MACHINE") |
175 | 176 | ||
@@ -236,7 +237,8 @@ def testimage_main(d): | |||
236 | d.getVar("TEST_SERVER_IP"), **target_kwargs) | 237 | d.getVar("TEST_SERVER_IP"), **target_kwargs) |
237 | 238 | ||
238 | # test context | 239 | # test context |
239 | tc = OERuntimeTestContext(td, logger, target, host_dumper, image_packages) | 240 | tc = OERuntimeTestContext(td, logger, target, host_dumper, |
241 | image_packages, extract_dir) | ||
240 | 242 | ||
241 | # Load tests before starting the target | 243 | # Load tests before starting the target |
242 | test_paths = get_runtime_paths(d) | 244 | test_paths = get_runtime_paths(d) |
@@ -343,22 +345,13 @@ def package_extraction(d, test_suites): | |||
343 | from oeqa.utils.package_manager import find_packages_to_extract | 345 | from oeqa.utils.package_manager import find_packages_to_extract |
344 | from oeqa.utils.package_manager import extract_packages | 346 | from oeqa.utils.package_manager import extract_packages |
345 | 347 | ||
346 | test_create_extract_dirs(d) | 348 | bb.utils.remove(d.getVar("TEST_NEEDED_PACKAGES_DIR"), recurse=True) |
347 | packages = find_packages_to_extract(test_suites) | 349 | packages = find_packages_to_extract(test_suites) |
348 | extract_packages(d, packages) | 350 | if packages: |
349 | 351 | bb.utils.mkdirhier(d.getVar("TEST_INSTALL_TMP_DIR")) | |
350 | def test_create_extract_dirs(d): | 352 | bb.utils.mkdirhier(d.getVar("TEST_PACKAGED_DIR")) |
351 | install_path = d.getVar("TEST_INSTALL_TMP_DIR") | 353 | bb.utils.mkdirhier(d.getVar("TEST_EXTRACTED_DIR")) |
352 | package_path = d.getVar("TEST_PACKAGED_DIR") | 354 | extract_packages(d, packages) |
353 | extracted_path = d.getVar("TEST_EXTRACTED_DIR") | ||
354 | bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR")) | ||
355 | bb.utils.remove(install_path, recurse=True) | ||
356 | bb.utils.remove(package_path, recurse=True) | ||
357 | bb.utils.remove(extracted_path, recurse=True) | ||
358 | bb.utils.mkdirhier(install_path) | ||
359 | bb.utils.mkdirhier(package_path) | ||
360 | bb.utils.mkdirhier(extracted_path) | ||
361 | |||
362 | 355 | ||
363 | testimage_main[vardepsexclude] += "BB_ORIGENV DATETIME" | 356 | testimage_main[vardepsexclude] += "BB_ORIGENV DATETIME" |
364 | 357 | ||