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
# 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)
self.rootfs = rootfs
self.streampath = '/tmp/qemuconnection.%s' % os.getpid()
- self.qemuparams = 'bootparams="console=ttyS0" qemuparams="-snapshot -serial unix:%s,server,nowait"' % self.streampath
+ self.qemuparams = 'bootparams="console=ttyS0" qemuparams="-serial unix:%s,server,nowait"' % self.streampath
self.qemupid = None
self.ip = None