Improve testing of mkinitpcio
We currently need two sets of tests in mkinitcpio
.
mkinitcpio
tests
We should write a test to ensure two runs of mkinitcpio
produces identical output.
Hook tests
Each hook should preferably have a test to validate the expected behavior. This doesn't mean we need to boot the thing, but we should validate it does include what we'd reasonably expect it to include.
Unit tests
We should have tests covering the functions in ./function
which is used in the hooks and generally in mkinitcpio
- All the
add_*
functions install_modules
and so on.
Integration tests
We should validate that a set of hooks manages to boot mkinitcpio
. This can be done by overriding the switch_root
call and instead try and validate the /new_root
mount instead of pivoting.