ci: add integration tests
This MR introduces integration testing for boot-deploy using pmbootstrap. The tests do a full pmbootstrap install
, replace the version of boot-deploy in the chroot with the local copy to be tested and simulates and upgrade by running mkinitfs
. Then the /boot
partition and the work_dir
are copied out of the chroot and inspected to ensure that the result is a bootable system.
Currently I have tests for the following:
- Android boot image:
- Android boot image is generated
- kernel inside boot.img matches kernel(-dtb) image in chroot (ie no corruption or unexpected behaviour like accidentally appending stuff to it)
- systemd-boot:
- boot entry config is generated
- devicetree is specified if
deviceinfo_dtb
is set -
linux
image specified actually exists
Still TODO are depthcharge, extlinux, and grub images, as well as MTK android quirks. I'm not particularly familiar with any of these, but I think what's here is enough for folks to review and hopefully merge.
The tests work by parsing deviceinfo, using the same source of truth as boot-deploy itself. This does make them vulnerable to certain bugs, it might make sense to have local copies of the deviceinfo files for specific devices.
The current selection of devices is fairly arbitrary, we should add a bunch more to cover different combinations of deviceinfo variables.