[test] Only check bootability for images on x86_64 and i386
Current check does not really work for other arches. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
247149d4e1
commit
ef99e28849
@ -133,7 +133,11 @@ def check(compose, variant, arch, image):
|
||||
if image.format == 'iso' and not iso:
|
||||
result = False
|
||||
raise RuntimeError('%s does not look like an ISO file' % path)
|
||||
if image.bootable and not has_mbr(f) and not has_gpt(f) and not (iso and has_eltorito(f)):
|
||||
if (image.arch in ('x86_64', 'i386') and
|
||||
image.bootable and
|
||||
not has_mbr(f) and
|
||||
not has_gpt(f) and
|
||||
not (iso and has_eltorito(f))):
|
||||
result = False
|
||||
raise RuntimeError(
|
||||
'%s is supposed to be bootable, but does not have MBR nor '
|
||||
|
@ -65,8 +65,9 @@ class TestCheckImageSanity(PungiTestCase):
|
||||
|
||||
self.assertIn('does not look like an ISO file', str(ctx.exception))
|
||||
|
||||
def test_bootable_iso_without_mbr_or_gpt_raises(self):
|
||||
def test_bootable_iso_without_mbr_or_gpt_raises_on_x86_64(self):
|
||||
compose = DummyCompose(self.topdir, {})
|
||||
compose.image.arch = 'x86_64'
|
||||
compose.image.format = 'iso'
|
||||
compose.image.bootable = True
|
||||
touch(os.path.join(self.topdir, 'compose', compose.image.path), UNBOOTABLE_ISO)
|
||||
@ -77,6 +78,18 @@ class TestCheckImageSanity(PungiTestCase):
|
||||
self.assertIn('is supposed to be bootable, but does not have MBR nor GPT',
|
||||
str(ctx.exception))
|
||||
|
||||
def test_bootable_iso_without_mbr_or_gpt_doesnt_raise_on_arm(self):
|
||||
compose = DummyCompose(self.topdir, {})
|
||||
compose.image.arch = 'armhfp'
|
||||
compose.image.format = 'iso'
|
||||
compose.image.bootable = True
|
||||
touch(os.path.join(self.topdir, 'compose', compose.image.path), UNBOOTABLE_ISO)
|
||||
|
||||
try:
|
||||
test_phase.check_image_sanity(compose)
|
||||
except:
|
||||
self.fail('Failable deliverable must not raise')
|
||||
|
||||
def test_failable_bootable_iso_without_mbr_gpt_doesnt_raise(self):
|
||||
compose = DummyCompose(self.topdir, {})
|
||||
compose.image.format = 'iso'
|
||||
|
Loading…
Reference in New Issue
Block a user