summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-03-06 17:10:11 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-08 11:13:46 +0000
commit770b87d903644641da41594193ee61b564dd99e9 (patch)
tree63ffbf664cd8264339f6471ea4ec31729bccbed8
parentf1f224a2d4d3f2a760632c2254e91a8f94c8814f (diff)
downloadopenembedded-core-contrib-770b87d903644641da41594193ee61b564dd99e9.tar.gz
openembedded-core-contrib-770b87d903644641da41594193ee61b564dd99e9.tar.bz2
openembedded-core-contrib-770b87d903644641da41594193ee61b564dd99e9.zip
selftest: test wic efi image in qemu
Added test_qemu_efi test case to wic test suite. It uses ovmf qemu extention to test mkefidisk image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/lib/oeqa/selftest/wic.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index b7fe52f45e..dcb88bacad 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -547,3 +547,17 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
status, output = qemu.run_serial(cmd)
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
+
+ def test_qemu_efi(self):
+ """Test core-image-minimal efi image under qemu"""
+ config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "mkefidisk.wks"\n'
+ self.append_config(config)
+ self.assertEqual(0, bitbake('core-image-minimal ovmf').status)
+ self.remove_config(config)
+
+ with runqemu('core-image-minimal', ssh=False,
+ runqemuparams='ovmf', image_fstype='wic') as qemu:
+ cmd = "grep vda. /proc/partitions |wc -l"
+ status, output = qemu.run_serial(cmd)
+ self.assertEqual(1, status, 'Failed to run command "%s": %s' % (cmd, output))
+ self.assertEqual(output, '3')