diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 15 | ||||
-rw-r--r-- | scripts/lib/wic/ksparser.py | 2 |
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 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""" |
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index 05ae292ef5..3453d9cb9d 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py | |||
@@ -145,7 +145,7 @@ class KickStart(): | |||
145 | part.add_argument('--exclude-path', nargs='+') | 145 | part.add_argument('--exclude-path', nargs='+') |
146 | part.add_argument('--include-path', nargs='+', action='append') | 146 | part.add_argument('--include-path', nargs='+', action='append') |
147 | part.add_argument('--change-directory') | 147 | part.add_argument('--change-directory') |
148 | part.add_argument("--extra-space", type=sizetype) | 148 | part.add_argument("--extra-space", type=sizetype("M")) |
149 | part.add_argument('--fsoptions', dest='fsopts') | 149 | part.add_argument('--fsoptions', dest='fsopts') |
150 | part.add_argument('--fstype', default='vfat', | 150 | part.add_argument('--fstype', default='vfat', |
151 | choices=('ext2', 'ext3', 'ext4', 'btrfs', | 151 | choices=('ext2', 'ext3', 'ext4', 'btrfs', |