|
5 | 5 |
|
6 | 6 | import pytest |
7 | 7 |
|
8 | | -from mkosi.config import Bootloader, Firmware, OutputFormat |
| 8 | +from mkosi.config import Architecture, Bootloader, Firmware, OutputFormat |
9 | 9 | from mkosi.distribution import Distribution |
10 | 10 | from mkosi.run import find_binary, run |
11 | 11 | from mkosi.versioncomp import GenericVersion |
@@ -59,7 +59,22 @@ def test_format(config: ImageConfig, format: OutputFormat) -> None: |
59 | 59 |
|
60 | 60 | @pytest.mark.parametrize("bootloader", Bootloader) |
61 | 61 | def test_bootloader(config: ImageConfig, bootloader: Bootloader) -> None: |
62 | | - if config.distribution == Distribution.rhel_ubi or bootloader.is_signed(): |
| 62 | + if config.distribution == Distribution.rhel_ubi or ( |
| 63 | + bootloader.is_signed() and bootloader != Bootloader.uki_signed |
| 64 | + ): |
| 65 | + return |
| 66 | + |
| 67 | + # TODO: want_prebuilt_uki() also fires for UnifiedKernelImage=signed with a non-signed bootloader, |
| 68 | + # but there is no integration test for that path yet. |
| 69 | + # uki-signed test matrix: |
| 70 | + # x86-64 Fedora β supports_smbios(uefi)=True, kernel-uki-virt available β runs |
| 71 | + # arm64 Fedora β supports_smbios(uefi)=True, kernel-uki-virt available β runs |
| 72 | + # ppc64le Fedora β supports_smbios(uefi)=False β skipped |
| 73 | + # non-Fedora β no kernel-uki-virt equivalent β skipped |
| 74 | + if bootloader == Bootloader.uki_signed and ( |
| 75 | + config.distribution != Distribution.fedora |
| 76 | + or not Architecture.native().supports_smbios(Firmware.uefi) |
| 77 | + ): |
63 | 78 | return |
64 | 79 |
|
65 | 80 | firmware = Firmware.linux if bootloader == Bootloader.none else Firmware.auto |
|
0 commit comments