summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-01-19 01:39:22 +0100
committerAlyssa Ross <hi@alyssa.is>2024-01-19 01:39:22 +0100
commit8fef1311d99d6a5026a3c548cf02cdc8cde0eec0 (patch)
treef49cdf6f546df5e04d1582b7c4619511f8492db7
parent91ca34cbf7142bf6334b7dd92c223bb1fa12332d (diff)
downloadspectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.tar
spectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.tar.gz
spectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.tar.bz2
spectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.tar.lz
spectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.tar.xz
spectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.tar.zst
spectrum-8fef1311d99d6a5026a3c548cf02cdc8cde0eec0.zip
release/checks/no-roothash.nix: fix for aarch64
Signed-off-by: Alyssa Ross <hi@alyssa.is>
-rw-r--r--release/checks/no-roothash.nix19
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")
   '';
-})) (_: {})
+}))) (_: {})