summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 8b58285c32..e6b23c6888 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -890,6 +890,30 @@ class Wic2(WicTestCase):
890 ]) 890 ])
891 891
892 with NamedTemporaryFile("w", suffix=".wks") as tempf: 892 with NamedTemporaryFile("w", suffix=".wks") as tempf:
893 # Test that partitions can be placed on a 512 byte sector boundary
894 tempf.write("bootloader --ptable gpt\n" \
895 "part / --source rootfs --ondisk hda --offset 65s --fixed-size 99M --fstype=ext4\n" \
896 "part /bar --ondisk hda --offset 102432 --fixed-size 100M --fstype=ext4\n")
897 tempf.flush()
898
899 _, partlns = self._get_wic_partitions(tempf.name, native_sysroot)
900 self.assertEqual(partlns, [
901 "1:32.5kiB:101408kiB:101376kiB:ext4:primary:;",
902 "2:102432kiB:204832kiB:102400kiB:ext4:primary:;",
903 ])
904
905 with NamedTemporaryFile("w", suffix=".wks") as tempf:
906 # Test that a partition can be placed immediately after a MSDOS partition table
907 tempf.write("bootloader --ptable msdos\n" \
908 "part / --source rootfs --ondisk hda --offset 1s --fixed-size 100M --fstype=ext4\n")
909 tempf.flush()
910
911 _, partlns = self._get_wic_partitions(tempf.name, native_sysroot)
912 self.assertEqual(partlns, [
913 "1:0.50kiB:102400kiB:102400kiB:ext4::;",
914 ])
915
916 with NamedTemporaryFile("w", suffix=".wks") as tempf:
893 # Test that image creation fails if the partitions would overlap 917 # Test that image creation fails if the partitions would overlap
894 tempf.write("bootloader --ptable gpt\n" \ 918 tempf.write("bootloader --ptable gpt\n" \
895 "part / --source rootfs --ondisk hda --offset 32 --fixed-size 100M --fstype=ext4\n" \ 919 "part / --source rootfs --ondisk hda --offset 32 --fixed-size 100M --fstype=ext4\n" \