diff options
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index a739f69b2e..7b173e4c09 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
@@ -30,7 +30,7 @@ from glob import glob | |||
30 | from shutil import rmtree | 30 | from shutil import rmtree |
31 | 31 | ||
32 | from oeqa.selftest.base import oeSelfTest | 32 | from oeqa.selftest.base import oeSelfTest |
33 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | 33 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu |
34 | from oeqa.utils.decorators import testcase | 34 | from oeqa.utils.decorators import testcase |
35 | 35 | ||
36 | 36 | ||
@@ -264,3 +264,13 @@ class Wic(oeSelfTest): | |||
264 | self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \ | 264 | self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \ |
265 | % image).status) | 265 | % image).status) |
266 | self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image))) | 266 | self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image))) |
267 | |||
268 | def test_qemu(self): | ||
269 | """Test wic-image-minimal under qemu""" | ||
270 | self.assertEqual(0, bitbake('wic-image-minimal').status) | ||
271 | |||
272 | with runqemu('wic-image-minimal', ssh=False) as qemu: | ||
273 | command = "mount |grep '^/dev/' | cut -f1,3 -d ' '" | ||
274 | status, output = qemu.run_serial(command) | ||
275 | self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output)) | ||
276 | self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt') | ||