mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 03:15:56 +03:00
nixos/tests/systemd-boot: only patch systemd-boot during update test
The update test patches the systemd-boot binary to report a known version then tests that this is the version updated from. The previous patch would also search the kernel and initrd binaries, which would cause sed to write out a temporary file that might cause the disk to run out of space and the test to fail. Only attempt to patch binaries which contain systemd-boot (usually `BOOT<arch>.EFI` and `systemd-boot<arch>.efi` to avoid this problem. As a bonus, this reduces test time by 20-30%.
This commit is contained in:
parent
8736edfd95
commit
ddc5d34f61
@ -101,7 +101,7 @@ in
|
||||
# Replace version inside sd-boot with something older. See magic[] string in systemd src/boot/efi/boot.c
|
||||
machine.succeed(
|
||||
"""
|
||||
find /boot -iname '*.efi' -print0 | \
|
||||
find /boot -iname '*boot*.efi' -print0 | \
|
||||
xargs -0 -I '{}' sed -i 's/#### LoaderInfo: systemd-boot .* ####/#### LoaderInfo: systemd-boot 000.0-1-notnixos ####/' '{}'
|
||||
"""
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user