diff options
-rw-r--r-- | meta/classes/testimage.bbclass | 9 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 2 |
2 files changed, 9 insertions, 2 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) |
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index ec9298863a..1051b2b3d8 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -18,7 +18,7 @@ class QemuRunner: | |||
18 | self.rootfs = rootfs | 18 | self.rootfs = rootfs |
19 | 19 | ||
20 | self.streampath = '/tmp/qemuconnection.%s' % os.getpid() | 20 | self.streampath = '/tmp/qemuconnection.%s' % os.getpid() |
21 | self.qemuparams = 'bootparams="console=ttyS0" qemuparams="-snapshot -serial unix:%s,server,nowait"' % self.streampath | 21 | self.qemuparams = 'bootparams="console=ttyS0" qemuparams="-serial unix:%s,server,nowait"' % self.streampath |
22 | self.qemupid = None | 22 | self.qemupid = None |
23 | self.ip = None | 23 | self.ip = None |
24 | 24 | ||