Skip to content

Add initial on-device CI support

Caleb Connolly requested to merge sdm845-mainline/pmaports:kernel-ci into master

Introduce a new initramfs hook to be used for running the postmarketOS initramfs in a testing environment (QEMU, CI, or manual testing). This employs the install_if feature of APKBUILDs to write tests as subpackages which will automatically be installed along with the CI hook depending on what device you're building for.

The general aim here is to utilise all the existing postmarketOS tooling and device support to build device-specific test environments with relative ease.

As an example, add a ci-test subpackage to qrtr which adds a simple test to validate that qrtr works and there is at least one available service.

Additionally, package the bootrr tool which checks that all the correct drivers have probed for the device.

All together, this will enable using postmarketOS to validate kernels in CI where it is preferred to only have a kernel and ramdisk. In the future it can be extended to also test features of the postmarketOS ramdisk and other parts of the OS.

For local testing, install postmarketos-mkinitfs-hook-ci-shell to drop into a shell after the tests have run.

Edited by Caleb Connolly

Merge request reports