summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oeqa/selftest/cases/wic.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/wic.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/selftest/cases/wic.py b/poky/meta/lib/oeqa/selftest/cases/wic.py
index b26b649c3a..0b0ca90c1e 100644
--- a/poky/meta/lib/oeqa/selftest/cases/wic.py
+++ b/poky/meta/lib/oeqa/selftest/cases/wic.py
@@ -1348,6 +1348,29 @@ class Wic2(WicTestCase):
if os.path.exists(image_path + '.bak'):
os.rename(image_path + '.bak', image_path)
+ def test_gpt_partition_name(self):
+ """Test --part-name argument to set partition name in GPT table"""
+ config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "test_gpt_partition_name.wks"\n'
+ self.append_config(config)
+ bitbake('core-image-minimal')
+ self.remove_config(config)
+ deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
+ machine = self.td['MACHINE']
+
+ image_path = os.path.join(deploy_dir, 'core-image-minimal-%s.wic' % machine)
+ # Image is created
+ self.assertTrue(os.path.exists(image_path))
+
+ # Check the names of the three partitions
+ # as listed in test_gpt_partition_name.wks
+ result = runCmd("sfdisk --part-label %s 1" % image_path)
+ self.assertEqual('boot-A', result.output)
+ result = runCmd("sfdisk --part-label %s 2" % image_path)
+ self.assertEqual('root-A', result.output)
+ # When the --part-name is not defined, the partition name is equal to the --label
+ result = runCmd("sfdisk --part-label %s 3" % image_path)
+ self.assertEqual('ext-space', result.output)
+
class ModifyTests(WicTestCase):
def test_wic_ls(self):
"""Test listing image content using 'wic ls'"""