summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-02-13 11:02:17 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 16:28:44 +0000
commit51e0a8a1800ab72b5b9af6faa7d0a66c603c9650 (patch)
tree16d4877a056a295ee88b21914bff19aaf8b55e1a /meta/lib/oeqa
parent2100f821e78d2205dc4c4ca600842cd720a7c4aa (diff)
downloadpoky-51e0a8a1800ab72b5b9af6faa7d0a66c603c9650.tar.gz
oe-selftest: add new wic testcase
Added test_qemu testcase to boot wic-image-minimal and test that 2 partitions mentioned in .wks are mounted. [YOCTO #8499] (From OE-Core rev: 6fb015d0847fe7d259d654d4a99bf4c328f810ab) (From OE-Core rev: be360c24649391235fd9547a8f2c1251b12e9c81) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/selftest/wic.py12
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
30from shutil import rmtree 30from shutil import rmtree
31 31
32from oeqa.selftest.base import oeSelfTest 32from oeqa.selftest.base import oeSelfTest
33from oeqa.utils.commands import runCmd, bitbake, get_bb_var 33from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
34from oeqa.utils.decorators import testcase 34from 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')