diff options
author | Nikolay Amiantov <ab@fmap.me> | 2019-07-22 13:21:33 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2019-07-22 14:44:53 +0300 |
commit | 5f4288d49df7b0846e6f10a12997b6234df235b4 (patch) | |
tree | 512ef4c7367f83f499f555aa53206b241dba92f6 /nixos/tests/boot.nix | |
parent | fd20e227a0c56c48c5c9907bb68b205995c75ee7 (diff) |
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.
Diffstat (limited to 'nixos/tests/boot.nix')
-rw-r--r-- | nixos/tests/boot.nix | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nixos/tests/boot.nix b/nixos/tests/boot.nix index 7d1b393da1e4e..57d8006d7ac33 100644 --- a/nixos/tests/boot.nix +++ b/nixos/tests/boot.nix @@ -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"; }; } |