diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index ee633f851a..2af3bf5306 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
| @@ -717,3 +717,22 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r | |||
| 717 | wksname = os.path.splitext(os.path.basename(wks.name))[0] | 717 | wksname = os.path.splitext(os.path.basename(wks.name))[0] |
| 718 | out = glob(self.resultdir + "%s-*direct" % wksname) | 718 | out = glob(self.resultdir + "%s-*direct" % wksname) |
| 719 | self.assertEqual(1, len(out)) | 719 | self.assertEqual(1, len(out)) |
| 720 | |||
| 721 | def test_fs_types(self): | ||
| 722 | """Test filesystem types for empty and not empty partitions""" | ||
| 723 | img = 'core-image-minimal' | ||
| 724 | with NamedTemporaryFile("w", suffix=".wks") as wks: | ||
| 725 | wks.writelines(['part ext2 --fstype ext2 --source rootfs\n', | ||
| 726 | 'part btrfs --fstype btrfs --source rootfs --size 40M\n', | ||
| 727 | 'part squash --fstype squashfs --source rootfs\n', | ||
| 728 | 'part swap --fstype swap --size 1M\n', | ||
| 729 | 'part emptyvfat --fstype vfat --size 1M\n', | ||
| 730 | 'part emptyext2 --fstype ext2 --size 1M\n', | ||
| 731 | 'part emptybtrfs --fstype btrfs --size 100M\n', | ||
| 732 | 'part emptysquash --fstype squash --size 1M\n']) | ||
| 733 | wks.flush() | ||
| 734 | cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) | ||
| 735 | self.assertEqual(0, runCmd(cmd).status) | ||
| 736 | wksname = os.path.splitext(os.path.basename(wks.name))[0] | ||
| 737 | out = glob(self.resultdir + "%s-*direct" % wksname) | ||
| 738 | self.assertEqual(1, len(out)) | ||
