summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-06 14:32:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-21 22:51:38 +0100
commit7916a5f013290c8b3fbfa76aa4630aacbc76b908 (patch)
treec1e4e714d5997774b8397a8f518c74a364a6ff46
parent7a2730fe7a114849fe9a5b740c2b4ddace7147d9 (diff)
downloadpoky-7916a5f013290c8b3fbfa76aa4630aacbc76b908.tar.gz
oe-selftest: wic: add test_mkfs_extraopts test case
Test new wks option --mkfs-extraopts with all filesystems supported by wic. (From OE-Core rev: 79e853c450708e1e06684cf1216337cbad964770) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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))