From 6e01bdc086a92cfd6286e3c35d43626a5a6b2cd3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 7 Jun 2023 13:52:57 +0200 Subject: [PATCH] tests: use module mode by default, export installed-system --- tests/lib.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/lib.nix b/tests/lib.nix index f4cd232..5a961c3 100644 --- a/tests/lib.nix +++ b/tests/lib.nix @@ -14,7 +14,7 @@ , efi ? true , enableOCR ? false , postDisko ? "" - , testMode ? "direct" # can be one of direct module cli + , testMode ? "module" # can be one of direct module cli , testBoot ? true # if we actually want to test booting or just create/mount }: let @@ -65,10 +65,12 @@ efiInstallAsRemovable = efi; }; }; - installedTopLevel = (eval-config { + installed-system-eval = eval-config { modules = [ installed-system ]; inherit (pkgs) system; - }).config.system.build.toplevel; + }; + + installedTopLevel = installed-system-eval.config.system.build.toplevel; in makeTest' { name = "disko-${name}"; @@ -111,6 +113,9 @@ }; virtualisation.emptyDiskImages = builtins.genList (_: 4096) num-disks; + + # useful for debugging via repl + system.build.systemToInstall = installed-system-eval; }; testScript = { nodes, ... }: ''