diff options
author | Ross Burton <ross@burtonini.com> | 2022-03-31 19:28:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-01 23:05:31 +0100 |
commit | f03d47833593734489e73f054f41c3dbbe423204 (patch) | |
tree | 30610b6df0706dc8fcce2e421a686cafaac84b4e | |
parent | e8e6c679f6eb74cb25c124a18af88dd5c2e2c833 (diff) | |
download | openembedded-core-contrib-f03d47833593734489e73f054f41c3dbbe423204.tar.gz |
oeqa/selftest/wic: don't hardcode kernel image type in test_wic_rm
Don't assume bzImage, resepct KERNEL_IMAGETYPE.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 10 |
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): self.assertEqual(1, len(images)) sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') + # Not bulletproof but hopefully sufficient + kerneltype = get_bb_var('KERNEL_IMAGETYPE', 'virtual/kernel') # list directory content of the first partition result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot)) - self.assertIn('\nBZIMAGE ', result.output) + self.assertIn('\n%s ' % kerneltype.upper(), result.output) self.assertIn('\nEFI <DIR> ', result.output) - # remove file - runCmd("wic rm %s:1/bzimage -n %s" % (images[0], sysroot)) + # remove file. EFI partitions are case-insensitive so exercise that too + runCmd("wic rm %s:1/%s -n %s" % (images[0], kerneltype.lower(), sysroot)) # remove directory runCmd("wic rm %s:1/efi -n %s" % (images[0], sysroot)) # check if they're removed result = runCmd("wic ls %s:1 -n %s" % (images[0], sysroot)) - self.assertNotIn('\nBZIMAGE ', result.output) + self.assertNotIn('\n%s ' % kerneltype.upper(), result.output) self.assertNotIn('\nEFI <DIR> ', result.output) def test_mkfs_extraopts(self): |