summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py15
-rw-r--r--scripts/lib/wic/ksparser.py2
2 files changed, 16 insertions, 1 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"""
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index f32315c631..ac6f427564 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -144,7 +144,7 @@ class KickStart():
144 part.add_argument('--offset', type=sizetype("K")) 144 part.add_argument('--offset', type=sizetype("K"))
145 part.add_argument('--exclude-path', nargs='+') 145 part.add_argument('--exclude-path', nargs='+')
146 part.add_argument('--include-path', nargs='+') 146 part.add_argument('--include-path', nargs='+')
147 part.add_argument("--extra-space", type=sizetype) 147 part.add_argument("--extra-space", type=sizetype("M"))
148 part.add_argument('--fsoptions', dest='fsopts') 148 part.add_argument('--fsoptions', dest='fsopts')
149 part.add_argument('--fstype', default='vfat', 149 part.add_argument('--fstype', default='vfat',
150 choices=('ext2', 'ext3', 'ext4', 'btrfs', 150 choices=('ext2', 'ext3', 'ext4', 'btrfs',