diff options
Diffstat (limited to 'release/checks/no-roothash.nix')
-rw-r--r-- | release/checks/no-roothash.nix | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/release/checks/no-roothash.nix b/release/checks/no-roothash.nix index 172638c..f9c2398 100644 --- a/release/checks/no-roothash.nix +++ b/release/checks/no-roothash.nix @@ -1,25 +1,28 @@ # SPDX-License-Identifier: MIT -# SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is> +# SPDX-FileCopyrightText: 2023-2024 Alyssa Ross <hi@alyssa.is> -import ../../lib/call-package.nix ({ callSpectrumPackage, rootfs, nixosTest }: +import ../../lib/call-package.nix ( +{ callSpectrumPackage, rootfs, lib, nixosTest, path }: + +lib.fix (self: nixosTest ({ pkgs, stdenv, ... }: let initramfs = callSpectrumPackage ../../host/initramfs {}; -in -nixosTest ({ stdenv, ... }: { + inherit (import (path + /nixos/lib/qemu-common.nix) { inherit lib pkgs; }) + qemuBinary qemuSerialDevice; +in { name = "spectrum-test-initramfs-no-roothash"; nodes = {}; testScript = '' import shlex - flags = " ".join(map(shlex.quote, [ - "qemu-kvm", + flags = "${qemuBinary self.config.qemu.package} " + " ".join(map(shlex.quote, [ "-m", "512", "-kernel", "${rootfs.kernel}/${stdenv.hostPlatform.linux-kernel.target}", "-initrd", "${initramfs}", - "-append", "console=ttyS0 panic=-1", + "-append", "console=${qemuSerialDevice} panic=-1", ])) machine = create_machine({"startCommand": flags}) @@ -27,4 +30,4 @@ nixosTest ({ stdenv, ... }: { machine.start() machine.wait_for_console_text("roothash invalid or missing") ''; -})) (_: {}) +}))) (_: {}) |