diff options
author | Bernardo Meurer <bernardo@meurer.org> | 2022-04-30 13:18:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-30 13:18:57 -0700 |
commit | 78f6f779627c89823d8402aac658418ef188be1c (patch) | |
tree | c6bfbb7f110660fdc211044179cd216cfdba716f /nixos/tests | |
parent | 405ce5693de092913107c8cfb33b328cee13addb (diff) | |
parent | f3f2e55e594f6b1e6bd75d41125fea13d3889896 (diff) | |
download | nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.tar nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.tar.gz nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.tar.bz2 nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.tar.lz nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.tar.xz nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.tar.zst nixpkgs-78f6f779627c89823d8402aac658418ef188be1c.zip |
Merge pull request #169113 from ElvishJerricco/systemd-stage-1-installer-tests
nixos: Installer tests for systemd stage 1
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/installer-systemd-stage-1.nix | 33 | ||||
-rw-r--r-- | nixos/tests/installer.nix | 7 |
3 files changed, 40 insertions, 1 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ad426fcf4e0..923464a0c9a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -235,6 +235,7 @@ in input-remapper = handleTest ./input-remapper.nix {}; inspircd = handleTest ./inspircd.nix {}; installer = handleTest ./installer.nix {}; + installer-systemd-stage-1 = handleTest ./installer-systemd-stage-1.nix {}; invoiceplane = handleTest ./invoiceplane.nix {}; iodine = handleTest ./iodine.nix {}; ipfs = handleTest ./ipfs.nix {}; diff --git a/nixos/tests/installer-systemd-stage-1.nix b/nixos/tests/installer-systemd-stage-1.nix new file mode 100644 index 00000000000..a8b418626e6 --- /dev/null +++ b/nixos/tests/installer-systemd-stage-1.nix @@ -0,0 +1,33 @@ +{ system ? builtins.currentSystem +, config ? {} +, pkgs ? import ../.. { inherit system config; } +}: + +{ + # Some of these tests don't work with systemd stage 1 yet. Uncomment + # them when fixed. + inherit (import ./installer.nix { inherit system config pkgs; systemdStage1 = true; }) + # bcache + # btrfsSimple + # btrfsSubvolDefault + # btrfsSubvols + # encryptedFSWithKeyfile + # grub1 + # luksroot + # luksroot-format1 + # luksroot-format2 + # lvm + separateBoot + separateBootFat + simple + simpleLabels + simpleProvided + simpleSpecialised + simpleUefiGrub + simpleUefiGrubSpecialisation + simpleUefiSystemdBoot + # swraid + # zfsroot + ; + +} diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index ea2b2d04ed1..d8187d8e019 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -1,6 +1,7 @@ { system ? builtins.currentSystem, config ? {}, - pkgs ? import ../.. { inherit system config; } + pkgs ? import ../.. { inherit system config; }, + systemdStage1 ? false }: with import ../lib/testing-python.nix { inherit system pkgs; }; @@ -23,6 +24,8 @@ let # To ensure that we can rebuild the grub configuration on the nixos-rebuild system.extraDependencies = with pkgs; [ stdenvNoCC ]; + ${optionalString systemdStage1 "boot.initrd.systemd.enable = true;"} + ${optionalString (bootLoader == "grub") '' boot.loader.grub.version = ${toString grubVersion}; ${optionalString (grubVersion == 1) '' @@ -290,6 +293,8 @@ let virtualisation.cores = 8; virtualisation.memorySize = 1536; + boot.initrd.systemd.enable = systemdStage1; + # Use a small /dev/vdb as the root disk for the # installer. This ensures the target disk (/dev/vda) is # the same during and after installation. |