summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-07-12 12:15:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-16 10:04:16 +0100
commit655da29dacc439ddb08e0607424a0f8c80681fed (patch)
tree6f898c9babf4f6f50e28953466a2dd306548850b
parent2079a30b1f0d56271484adc708aa43c3f2808e2e (diff)
downloadpoky-655da29dacc439ddb08e0607424a0f8c80681fed.tar.gz
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. (From OE-Core rev: ba58f1fe8fb7a0e3ff9320dfc108235d484da6a1) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/testimage.bbclass9
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py2
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