[OE-core] [wic][PATCH 11/15] oe-selftest: add new wic testcase
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Feb 2 07:28:03 UTC 2016
Added test_qemu testcase to boot wic-image-minimal and test
that 2 partitions mentioned in .wks are mounted.
[YOCTO #8499]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta/lib/oeqa/selftest/wic.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index df826ed..4985714 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -30,7 +30,7 @@ from glob import glob
from shutil import rmtree
from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
from oeqa.utils.decorators import testcase
@@ -264,3 +264,13 @@ class Wic(oeSelfTest):
self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
% image).status)
self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
+
+ def test_qemu(self):
+ """Test wic-image-minimal under qemu"""
+ self.assertEqual(0, bitbake('wic-image-minimal').status)
+
+ with runqemu('wic-image-minimal', ssh=False) as qemu:
+ command = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
+ status, output = qemu.run_serial(command)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
+ self.assertEqual(output, '/dev/root /\r\n/dev/hda3 /mnt')
--
2.1.4
More information about the Openembedded-core
mailing list