diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-03-26 18:38:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-01 08:14:57 +0100 |
commit | fae19c345de67663f577b2fc9e93070ea976f211 (patch) | |
tree | fd863907897aa8c6b9f97a5ae59af9071fff17be /meta/lib/oeqa/selftest | |
parent | 0de9b2ade8e02c8726963abb620dc8b2bbe39fb6 (diff) | |
download | poky-fae19c345de67663f577b2fc9e93070ea976f211.tar.gz |
oe-selftest: add wic test case test_fs_types
Added wic test case to test all possible filesystem
types for empty and not empty partitions.
[YOCTO #10618]
(From OE-Core rev: 95ec9e6b987706fac9bd410681f0950f957989bb)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-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)) | ||