summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:28:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-01 23:11:37 +0100
commite2d112b4713e366f5668ea052c4e060eeea1e666 (patch)
tree9a0b08278f279978b39e94bf1d0aff0638421876 /meta/lib/oeqa/selftest/cases/wic.py
parente9c8d638f91471a45ff0e13692fc58e8e2edacdf (diff)
downloadpoky-e2d112b4713e366f5668ea052c4e060eeea1e666.tar.gz
oeqa/selftest/wic: don't hardcode kernel image type in test_wic_rm
Don't assume bzImage, resepct KERNEL_IMAGETYPE. (From OE-Core rev: f03d47833593734489e73f054f41c3dbbe423204) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 317b80ea27..eb376e1e2c 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1337,21 +1337,23 @@ class Wic2(WicTestCase):
1337 self.assertEqual(1, len(images)) 1337 self.assertEqual(1, len(images))
1338 1338
1339 sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') 1339 sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
1340 # Not bulletproof but hopefully sufficient
1341 kerneltype = get_bb_var('KERNEL_IMAGETYPE', 'virtual/kernel')
1340 1342
1341 # list directory content of the first partition 1343 # list directory content of the first partition
1342 result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot)) 1344 result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
1343 self.assertIn('\nBZIMAGE ', result.output) 1345 self.assertIn('\n%s ' % kerneltype.upper(), result.output)
1344 self.assertIn('\nEFI <DIR> ', result.output) 1346 self.assertIn('\nEFI <DIR> ', result.output)
1345 1347
1346 # remove file 1348 # remove file. EFI partitions are case-insensitive so exercise that too
1347 runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot)) 1349 runCmd("wic rm %s:1/%s -n %s" % (images[0], kerneltype.lower(), sysroot))
1348 1350
1349 # remove directory 1351 # remove directory
1350 runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot)) 1352 runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot))
1351 1353
1352 # check if they're removed 1354 # check if they're removed
1353 result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot)) 1355 result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot))
1354 self.assertNotIn('\nBZIMAGE ', result.output) 1356 self.assertNotIn('\n%s ' % kerneltype.upper(), result.output)
1355 self.assertNotIn('\nEFI <DIR> ', result.output) 1357 self.assertNotIn('\nEFI <DIR> ', result.output)
1356 1358
1357 def test_mkfs_extraopts(self): 1359 def test_mkfs_extraopts(self):