summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 737fbc6002..df205e89d0 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -919,3 +919,22 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
919 self.assertEqual(0, result.status) 919 self.assertEqual(0, result.status)
920 self.assertNotIn('\nBZIMAGE ', result.output) 920 self.assertNotIn('\nBZIMAGE ', result.output)
921 self.assertNotIn('\nEFI <DIR> ', result.output) 921 self.assertNotIn('\nEFI <DIR> ', result.output)
922
923 def test_mkfs_extraopts(self):
924 """Test wks option --mkfs-extraopts for empty and not empty partitions"""
925 img = 'core-image-minimal'
926 with NamedTemporaryFile("w", suffix=".wks") as wks:
927 wks.writelines(
928 ['part ext2 --fstype ext2 --source rootfs --mkfs-extraopts "-D -F -i 8192"\n',
929 'part btrfs --fstype btrfs --source rootfs --size 40M --mkfs-extraopts "--mixed -K"\n',
930 'part squash --fstype squashfs --source rootfs --mkfs-extraopts "-no-sparse -b 4096"\n',
931 'part emptyvfat --fstype vfat --size 1M --mkfs-extraopts "-S 1024 -s 64"\n',
932 'part emptymsdos --fstype msdos --size 1M --mkfs-extraopts "-S 1024 -s 64"\n',
933 'part emptyext2 --fstype ext2 --size 1M --mkfs-extraopts "-D -F -i 8192"\n',
934 'part emptybtrfs --fstype btrfs --size 100M --mkfs-extraopts "--mixed -K"\n'])
935 wks.flush()
936 cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir)
937 self.assertEqual(0, runCmd(cmd).status)
938 wksname = os.path.splitext(os.path.basename(wks.name))[0]
939 out = glob(self.resultdir + "%s-*direct" % wksname)
940 self.assertEqual(1, len(out))