tests: add testBoot parameter to disable boot tests

This commit is contained in:
lassulus 2022-11-10 09:46:06 +01:00
parent 78d9448fcf
commit c5973aed4e

View file

@ -13,6 +13,7 @@
, efi ? true
, enableOCR ? false
, testMode ? "direct" # can be one of direct module cli
, testBoot ? true # if we actually want to test booting or just create/mount
}:
let
lib = pkgs.lib;
@ -141,6 +142,7 @@
machine.succeed("${tsp-mount}") # verify that the command is idempotent
''}
${lib.optionalString testBoot ''
# mount nix-store in /mnt
machine.succeed("mkdir -p /mnt/nix/store")
machine.succeed("mount --bind /nix/store /mnt/nix/store")
@ -161,6 +163,8 @@
machine.start()
${bootCommands}
machine.wait_for_unit("local-fs.target")
''}
${extraTestScript}
'';
};