diff options
Diffstat (limited to 'meta/classes/testimage.bbclass')
-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): | |||
22 | import os | 22 | import os |
23 | import oeqa.runtime | 23 | import oeqa.runtime |
24 | import re | 24 | import re |
25 | import shutil | ||
25 | from oeqa.oetest import runTests | 26 | from oeqa.oetest import runTests |
26 | from oeqa.utils.sshcontrol import SSHControl | 27 | from oeqa.utils.sshcontrol import SSHControl |
27 | from oeqa.utils.qemurunner import QemuRunner | 28 | from oeqa.utils.qemurunner import QemuRunner |
@@ -61,7 +62,13 @@ def testimage_main(d): | |||
61 | # and boot each supported fs type | 62 | # and boot each supported fs type |
62 | machine=d.getVar("MACHINE", True) | 63 | machine=d.getVar("MACHINE", True) |
63 | #will handle fs type eventually, stick with ext3 for now | 64 | #will handle fs type eventually, stick with ext3 for now |
64 | rootfs=d.getVar("DEPLOY_DIR_IMAGE", True) + '/' + d.getVar("IMAGE_BASENAME",True) + '-' + machine + '.ext3' | 65 | #make a copy of the original rootfs and use that for tests |
66 | origrootfs=os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME",True) + '.ext3') | ||
67 | rootfs=os.path.join(testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.ext3') | ||
68 | try: | ||
69 | shutil.copyfile(origrootfs, rootfs) | ||
70 | except Exception as e: | ||
71 | bb.fatal("Error copying rootfs: %s" % e) | ||
65 | 72 | ||
66 | qemu = QemuRunner(machine, rootfs) | 73 | qemu = QemuRunner(machine, rootfs) |
67 | qemu.tmpdir = d.getVar("TMPDIR", True) | 74 | qemu.tmpdir = d.getVar("TMPDIR", True) |