diff --git a/pungi/phases/test.py b/pungi/phases/test.py index 61cbf199..7e8993ec 100644 --- a/pungi/phases/test.py +++ b/pungi/phases/test.py @@ -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 ' diff --git a/tests/test_test_phase.py b/tests/test_test_phase.py index 7780068e..c2d4a9a2 100755 --- a/tests/test_test_phase.py +++ b/tests/test_test_phase.py @@ -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'