diff options
Diffstat (limited to 'meta/lib')
| -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 6d4068a527..a166d3f614 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
| @@ -757,6 +757,21 @@ class Wic2(WicTestCase): | |||
| 757 | p, _ = self._get_wic_partitions(tempf.name, ignore_status=True) | 757 | p, _ = self._get_wic_partitions(tempf.name, ignore_status=True) |
| 758 | self.assertNotEqual(p.status, 0, "wic exited successfully when an error was expected:\n%s" % p.output) | 758 | self.assertNotEqual(p.status, 0, "wic exited successfully when an error was expected:\n%s" % p.output) |
| 759 | 759 | ||
| 760 | def test_extra_space(self): | ||
| 761 | native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools") | ||
| 762 | |||
| 763 | with NamedTemporaryFile("w", suffix=".wks") as tempf: | ||
| 764 | tempf.write("bootloader --ptable gpt\n" \ | ||
| 765 | "part / --source rootfs --ondisk hda --extra-space 200M --fstype=ext4\n") | ||
| 766 | tempf.flush() | ||
| 767 | |||
| 768 | _, partlns = self._get_wic_partitions(tempf.name, native_sysroot) | ||
| 769 | self.assertEqual(len(partlns), 1) | ||
| 770 | size = partlns[0].split(':')[3] | ||
| 771 | self.assertRegex(size, r'^[0-9]+kiB$') | ||
| 772 | size = int(size[:-3]) | ||
| 773 | self.assertGreaterEqual(size, 204800) | ||
| 774 | |||
| 760 | @only_for_arch(['i586', 'i686', 'x86_64']) | 775 | @only_for_arch(['i586', 'i686', 'x86_64']) |
| 761 | def test_rawcopy_plugin_qemu(self): | 776 | def test_rawcopy_plugin_qemu(self): |
| 762 | """Test rawcopy plugin in qemu""" | 777 | """Test rawcopy plugin in qemu""" |
