diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 24 |
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 b4866bcb32..ab248c5898 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -748,6 +748,30 @@ part /etc --source rootfs --fstype=ext4 --change-directory=etc | |||
748 | 748 | ||
749 | os.remove(wks_file) | 749 | os.remove(wks_file) |
750 | 750 | ||
751 | def test_partition_hidden_attributes(self): | ||
752 | """Test --hidden wks option.""" | ||
753 | wks_file = 'temp.wks' | ||
754 | sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') | ||
755 | try: | ||
756 | with open(wks_file, 'w') as wks: | ||
757 | wks.write(""" | ||
758 | part / --source rootfs --fstype=ext4 | ||
759 | part / --source rootfs --fstype=ext4 --hidden | ||
760 | bootloader --ptable gpt""") | ||
761 | |||
762 | runCmd("wic create %s -e core-image-minimal -o %s" \ | ||
763 | % (wks_file, self.resultdir)) | ||
764 | wicout = os.path.join(self.resultdir, "*.direct") | ||
765 | |||
766 | result = runCmd("%s/usr/sbin/sfdisk --part-attrs %s 1" % (sysroot, wicout)) | ||
767 | self.assertEqual('', result.output) | ||
768 | result = runCmd("%s/usr/sbin/sfdisk --part-attrs %s 2" % (sysroot, wicout)) | ||
769 | self.assertEqual('RequiredPartition', result.output) | ||
770 | |||
771 | finally: | ||
772 | os.remove(wks_file) | ||
773 | |||
774 | |||
751 | class Wic2(WicTestCase): | 775 | class Wic2(WicTestCase): |
752 | 776 | ||
753 | def test_bmap_short(self): | 777 | def test_bmap_short(self): |