diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2013-07-12 12:15:19 +0300 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-07-15 10:29:27 -0700 |
commit | ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1 (patch) | |
tree | bf92e0976a5e2c7b865ef40e1d69261ddd4d1c2d /meta/classes | |
parent | 1b39d57e7b5c9b69d565cf4d188ebc2f14e66ae6 (diff) | |
download | openembedded-core-ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1.tar.gz openembedded-core-ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1.tar.bz2 openembedded-core-ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1.zip |
classes/testimage.bbclass: use a copy of rootfs for tests
Make a copy of the rootfs and test that.
We can now drop the snapshot option.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/testimage.bbclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 22f0a9269d..940520ffd6 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -22,6 +22,7 @@ def testimage_main(d): import os import oeqa.runtime import re + import shutil from oeqa.oetest import runTests from oeqa.utils.sshcontrol import SSHControl from oeqa.utils.qemurunner import QemuRunner @@ -61,7 +62,13 @@ def testimage_main(d): # and boot each supported fs type machine=d.getVar("MACHINE", True) #will handle fs type eventually, stick with ext3 for now - rootfs=d.getVar("DEPLOY_DIR_IMAGE", True) + '/' + d.getVar("IMAGE_BASENAME",True) + '-' + machine + '.ext3' + #make a copy of the original rootfs and use that for tests + origrootfs=os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME",True) + '.ext3') + rootfs=os.path.join(testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.ext3') + try: + shutil.copyfile(origrootfs, rootfs) + except Exception as e: + bb.fatal("Error copying rootfs: %s" % e) qemu = QemuRunner(machine, rootfs) qemu.tmpdir = d.getVar("TMPDIR", True) |