summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:29:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-01 23:11:37 +0100
commit1985249632d51e594c624a97c1f81cfec4ed3914 (patch)
tree91533aa30f9304c4c3e2913506e7bd93f1a4fb33 /meta/lib/oeqa/selftest/cases/wic.py
parente2d112b4713e366f5668ea052c4e060eeea1e666 (diff)
downloadpoky-1985249632d51e594c624a97c1f81cfec4ed3914.tar.gz
oeqa/selftest/wic: add more arch-specific annotations
Some tests which are marked as x86-specific will actually work on aarch64 (e.g. use EFI), whilst some other tests really are x86-specific (e.g. use syslinux). (From OE-Core rev: 1285bdaa4f472519083c03946ee34c7d8c204e27) 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.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index eb376e1e2c..325fb7776a 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -203,7 +203,7 @@ class Wic(WicTestCase):
203 runCmd(cmd) 203 runCmd(cmd)
204 self.assertEqual(1, len(glob(self.resultdir + "qemux86-directdisk-*direct"))) 204 self.assertEqual(1, len(glob(self.resultdir + "qemux86-directdisk-*direct")))
205 205
206 @only_for_arch(['i586', 'i686', 'x86_64']) 206 @only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
207 def test_mkefidisk(self): 207 def test_mkefidisk(self):
208 """Test creation of mkefidisk image""" 208 """Test creation of mkefidisk image"""
209 cmd = "wic create mkefidisk -e core-image-minimal -o %s" % self.resultdir 209 cmd = "wic create mkefidisk -e core-image-minimal -o %s" % self.resultdir
@@ -221,7 +221,7 @@ class Wic(WicTestCase):
221 runCmd(cmd) 221 runCmd(cmd)
222 self.assertEqual(1, len(glob(self.resultdir + "directdisk-bootloader-config-*direct"))) 222 self.assertEqual(1, len(glob(self.resultdir + "directdisk-bootloader-config-*direct")))
223 223
224 @only_for_arch(['i586', 'i686', 'x86_64']) 224 @only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
225 def test_systemd_bootdisk(self): 225 def test_systemd_bootdisk(self):
226 """Test creation of systemd-bootdisk image""" 226 """Test creation of systemd-bootdisk image"""
227 config = 'MACHINE_FEATURES:append = " efi"\n' 227 config = 'MACHINE_FEATURES:append = " efi"\n'
@@ -251,6 +251,7 @@ class Wic(WicTestCase):
251 runCmd(cmd) 251 runCmd(cmd)
252 self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct"))) 252 self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct")))
253 253
254 # TODO this doesn't have to be x86-specific
254 @only_for_arch(['i586', 'i686', 'x86_64']) 255 @only_for_arch(['i586', 'i686', 'x86_64'])
255 def test_default_output_dir(self): 256 def test_default_output_dir(self):
256 """Test default output location""" 257 """Test default output location"""
@@ -355,6 +356,7 @@ class Wic(WicTestCase):
355 "--outdir %s" % self.resultdir) 356 "--outdir %s" % self.resultdir)
356 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) 357 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct")))
357 358
359 # TODO this doesn't have to be x86-specific
358 @only_for_arch(['i586', 'i686', 'x86_64']) 360 @only_for_arch(['i586', 'i686', 'x86_64'])
359 def test_rootfs_indirect_recipes(self): 361 def test_rootfs_indirect_recipes(self):
360 """Test usage of rootfs plugin with rootfs recipes""" 362 """Test usage of rootfs plugin with rootfs recipes"""
@@ -365,6 +367,7 @@ class Wic(WicTestCase):
365 "--outdir %s" % self.resultdir) 367 "--outdir %s" % self.resultdir)
366 self.assertEqual(1, len(glob(self.resultdir + "directdisk-multi-rootfs*.direct"))) 368 self.assertEqual(1, len(glob(self.resultdir + "directdisk-multi-rootfs*.direct")))
367 369
370 # TODO this doesn't have to be x86-specific
368 @only_for_arch(['i586', 'i686', 'x86_64']) 371 @only_for_arch(['i586', 'i686', 'x86_64'])
369 def test_rootfs_artifacts(self): 372 def test_rootfs_artifacts(self):
370 """Test usage of rootfs plugin with rootfs paths""" 373 """Test usage of rootfs plugin with rootfs paths"""
@@ -818,7 +821,7 @@ class Wic2(WicTestCase):
818 self.resultdir)) 821 self.resultdir))
819 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) 822 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
820 823
821 @only_for_arch(['i586', 'i686', 'x86_64']) 824 @only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
822 def test_wic_image_type(self): 825 def test_wic_image_type(self):
823 """Test building wic images by bitbake""" 826 """Test building wic images by bitbake"""
824 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\ 827 config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = "wic-image-minimal"\n'\
@@ -838,6 +841,7 @@ class Wic2(WicTestCase):
838 self.assertTrue(os.path.islink(path)) 841 self.assertTrue(os.path.islink(path))
839 self.assertTrue(os.path.isfile(os.path.realpath(path))) 842 self.assertTrue(os.path.isfile(os.path.realpath(path)))
840 843
844 # TODO this should work on aarch64
841 @only_for_arch(['i586', 'i686', 'x86_64']) 845 @only_for_arch(['i586', 'i686', 'x86_64'])
842 def test_qemu(self): 846 def test_qemu(self):
843 """Test wic-image-minimal under qemu""" 847 """Test wic-image-minimal under qemu"""
@@ -1041,7 +1045,7 @@ class Wic2(WicTestCase):
1041 size = int(size[:-3]) 1045 size = int(size[:-3])
1042 self.assertGreaterEqual(size, 204800) 1046 self.assertGreaterEqual(size, 204800)
1043 1047
1044 @only_for_arch(['i586', 'i686', 'x86_64']) 1048 @only_for_arch(['i586', 'i686', 'x86_64', 'aarch64'])
1045 def test_rawcopy_plugin_qemu(self): 1049 def test_rawcopy_plugin_qemu(self):
1046 """Test rawcopy plugin in qemu""" 1050 """Test rawcopy plugin in qemu"""
1047 # build ext4 and then use it for a wic image 1051 # build ext4 and then use it for a wic image
@@ -1166,6 +1170,7 @@ class Wic2(WicTestCase):
1166 out = glob(self.resultdir + "%s-*.direct" % wksname) 1170 out = glob(self.resultdir + "%s-*.direct" % wksname)
1167 self.assertEqual(1, len(out)) 1171 self.assertEqual(1, len(out))
1168 1172
1173 # TODO this test could also work on aarch64
1169 @only_for_arch(['i586', 'i686', 'x86_64']) 1174 @only_for_arch(['i586', 'i686', 'x86_64'])
1170 def test_efi_plugin_unified_kernel_image_qemu(self): 1175 def test_efi_plugin_unified_kernel_image_qemu(self):
1171 """Test efi plugin's Unified Kernel Image feature in qemu""" 1176 """Test efi plugin's Unified Kernel Image feature in qemu"""
@@ -1375,6 +1380,7 @@ class Wic2(WicTestCase):
1375 out = glob(self.resultdir + "%s-*direct" % wksname) 1380 out = glob(self.resultdir + "%s-*direct" % wksname)
1376 self.assertEqual(1, len(out)) 1381 self.assertEqual(1, len(out))
1377 1382
1383 @only_for_arch(['i586', 'i686', 'x86_64'])
1378 def test_expand_mbr_image(self): 1384 def test_expand_mbr_image(self):
1379 """Test wic write --expand command for mbr image""" 1385 """Test wic write --expand command for mbr image"""
1380 # build an image 1386 # build an image