diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 9e7be6168e..8b58285c32 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -908,6 +908,21 @@ class Wic2(WicTestCase): | |||
908 | p, _ = self._get_wic_partitions(tempf.name, ignore_status=True) | 908 | p, _ = self._get_wic_partitions(tempf.name, ignore_status=True) |
909 | self.assertNotEqual(p.status, 0, "wic exited successfully when an error was expected:\n%s" % p.output) | 909 | self.assertNotEqual(p.status, 0, "wic exited successfully when an error was expected:\n%s" % p.output) |
910 | 910 | ||
911 | def test_extra_space(self): | ||
912 | native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") | ||
913 | |||
914 | with NamedTemporaryFile("w", suffix=".wks") as tempf: | ||
915 | tempf.write("bootloader --ptable gpt\n" \ | ||
916 | "part / --source rootfs --ondisk hda --extra-space 200M --fstype=ext4\n") | ||
917 | tempf.flush() | ||
918 | |||
919 | _, partlns = self._get_wic_partitions(tempf.name, native_sysroot) | ||
920 | self.assertEqual(len(partlns), 1) | ||
921 | size = partlns[0].split(':')[3] | ||
922 | self.assertRegex(size, r'^[0-9]+kiB$') | ||
923 | size = int(size[:-3]) | ||
924 | self.assertGreaterEqual(size, 204800) | ||
925 | |||
911 | @only_for_arch(['i586', 'i686', 'x86_64']) | 926 | @only_for_arch(['i586', 'i686', 'x86_64']) |
912 | def test_rawcopy_plugin_qemu(self): | 927 | def test_rawcopy_plugin_qemu(self): |
913 | """Test rawcopy plugin in qemu""" | 928 | """Test rawcopy plugin in qemu""" |