From 4d15fb3ade85275b6a1404644ef339b7fdd713e4 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 13 Feb 2023 20:12:11 -0800 Subject: [PATCH] nixos/tests/installer.nix: fix hydra eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hydra Eval has been throwing these eval errors for the past four months, which makes the yellow "Eval Errors" bubble pretty useless: https://hydra.nixos.org/eval/1790611#tabs-errors ``` in job ‘nixos.tests.installer.separateBoot.aarch64-linux’: error: Non-EFI boot methods are only supported on i686 / x86_64 in job ‘nixos.tests.installer.simple.aarch64-linux’: error: Non-EFI boot methods are only supported on i686 / x86_64 in job ‘nixos.tests.installer.lvm.aarch64-linux’: error: Non-EFI boot methods are only supported on i686 / x86_64 ``` This PR moves the failure for the `!isEfi && !pkgs.stdenv.hostPlatform.isx86` case from eval-time to runtime, so the failure gets categorized under the test that produced it, rather than just being lumped in to the catch-all Eval Errors pile which... apparently nobody cares about. --- nixos/tests/installer.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 3adfa979edc..d441765fe19 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -77,9 +77,9 @@ let let iface = if grubVersion == 1 then "ide" else "virtio"; isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi); bios = if pkgs.stdenv.isAarch64 then "QEMU_EFI.fd" else "OVMF.fd"; - in if !isEfi && !pkgs.stdenv.hostPlatform.isx86 then - throw "Non-EFI boot methods are only supported on i686 / x86_64" - else '' + in if !isEfi && !pkgs.stdenv.hostPlatform.isx86 then '' + machine.succeed("true") + '' else '' def assemble_qemu_flags(): flags = "-cpu max" ${if (system == "x86_64-linux" || system == "i686-linux")