mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
boot tests: don't use globbing
Turns out I broke all the boot tests except netboot. Instead of relying on build-time search for .iso we can use a proper attribute.
This commit is contained in:
parent
fd20e227a0
commit
5f4288d49d
@ -17,7 +17,7 @@ let
|
||||
];
|
||||
}).config.system.build.isoImage;
|
||||
|
||||
perlAttrs = params: "{ ${concatStringsSep "," (mapAttrsToList (name: param: "${name} => '${toString param}'") params)} }";
|
||||
perlAttrs = params: "{ ${concatStringsSep ", " (mapAttrsToList (name: param: "${name} => ${builtins.toJSON param}") params)} }";
|
||||
|
||||
makeBootTest = name: extraConfig:
|
||||
let
|
||||
@ -79,28 +79,28 @@ let
|
||||
in {
|
||||
|
||||
biosCdrom = makeBootTest "bios-cdrom" {
|
||||
cdrom = ''glob("${iso}/iso/*.iso")'';
|
||||
cdrom = "${iso}/iso/${iso.isoName}";
|
||||
};
|
||||
|
||||
biosUsb = makeBootTest "bios-usb" {
|
||||
usb = ''glob("${iso}/iso/*.iso")'';
|
||||
usb = "${iso}/iso/${iso.isoName}";
|
||||
};
|
||||
|
||||
uefiCdrom = makeBootTest "uefi-cdrom" {
|
||||
cdrom = ''glob("${iso}/iso/*.iso"'';
|
||||
bios = ''"${pkgs.OVMF.fd}/FV/OVMF.fd"'';
|
||||
cdrom = "${iso}/iso/${iso.isoName}";
|
||||
bios = "${pkgs.OVMF.fd}/FV/OVMF.fd";
|
||||
};
|
||||
|
||||
uefiUsb = makeBootTest "uefi-usb" {
|
||||
usb = ''glob("${iso}/iso/*.iso")'';
|
||||
bios = ''"${pkgs.OVMF.fd}/FV/OVMF.fd"'';
|
||||
usb = "${iso}/iso/${iso.isoName}";
|
||||
bios = "${pkgs.OVMF.fd}/FV/OVMF.fd";
|
||||
};
|
||||
|
||||
biosNetboot = makeNetbootTest "bios" {};
|
||||
|
||||
uefiNetboot = makeNetbootTest "uefi" {
|
||||
bios = ''"${pkgs.OVMF.fd}/FV/OVMF.fd"'';
|
||||
bios = "${pkgs.OVMF.fd}/FV/OVMF.fd";
|
||||
# Custom ROM is needed for EFI PXE boot. I failed to understand exactly why, because QEMU should still use iPXE for EFI.
|
||||
netFrontendArgs = ''romfile="${pkgs.ipxe}/ipxe.efirom"'';
|
||||
netFrontendArgs = "romfile=${pkgs.ipxe}/ipxe.efirom";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user