diff options
Diffstat (limited to 'scripts/testing/tests/test_boot.py')
| -rw-r--r-- | scripts/testing/tests/test_boot.py | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/scripts/testing/tests/test_boot.py b/scripts/testing/tests/test_boot.py index fdbe7cb..78b4404 100644 --- a/scripts/testing/tests/test_boot.py +++ b/scripts/testing/tests/test_boot.py @@ -10,8 +10,15 @@ import pytest @pytest.mark.attribution("archsetup") -def test_grub_config_exists(host): - assert host.file("/boot/grub/grub.cfg").exists +def test_bootloader_installed(host, zfs_root): + # A ZFS root boots via ZFSBootMenu (archangel installs the EFI binary under + # /efi/EFI/ZBM), so there is no GRUB; a non-ZFS root uses GRUB. + if zfs_root: + assert host.file("/efi/EFI/ZBM/zfsbootmenu.efi").exists, \ + "ZFS root must have the ZFSBootMenu EFI binary" + else: + assert host.file("/boot/grub/grub.cfg").exists, \ + "non-ZFS root must have a GRUB config" @pytest.mark.attribution("archsetup") @@ -27,7 +34,16 @@ def test_mkinitcpio_hooks(host, zfs_root): @pytest.mark.attribution("archsetup") -def test_console_font_in_initramfs(host): +def test_console_font_configured(host, zfs_root): + # archsetup sets FONT=ter-132n in /etc/vconsole.conf on every run. + assert host.file("/etc/vconsole.conf").contains("^FONT=ter-132n"), \ + "archsetup should set FONT=ter-132n in /etc/vconsole.conf" + # On non-ZFS it also rebuilds the initramfs (mkinitcpio -P) so the font is + # baked in for early boot. On ZFS that rebuild is skipped (the busybox ZFS + # hook is incompatible with the systemd-hook switch), so the font applies at + # the vconsole layer once userspace starts, not inside the initramfs. + if zfs_root: + return # Pick the main initramfs (this fleet runs linux-lts, so the name is # initramfs-linux-lts.img, not initramfs-linux.img); skip the fallback image. img = host.run( |
