mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 13:15:30 +03:00
nixos/tests/installer: add postInstallCommands to makeInstallerTest
This commit is contained in:
parent
858c6b9329
commit
b8a547d38b
1 changed files with 8 additions and 4 deletions
|
@ -69,8 +69,8 @@ let
|
||||||
# disk, and then reboot from the hard disk. It's parameterized with
|
# disk, and then reboot from the hard disk. It's parameterized with
|
||||||
# a test script fragment `createPartitions', which must create
|
# a test script fragment `createPartitions', which must create
|
||||||
# partitions and filesystems.
|
# partitions and filesystems.
|
||||||
testScriptFun = { bootLoader, createPartitions, grubDevice, grubUseEfi
|
testScriptFun = { bootLoader, createPartitions, grubDevice, grubUseEfi, grubIdentifier
|
||||||
, grubIdentifier, preBootCommands, postBootCommands, extraConfig
|
, postInstallCommands, preBootCommands, postBootCommands, extraConfig
|
||||||
, testSpecialisationConfig, testFlakeSwitch
|
, testSpecialisationConfig, testFlakeSwitch
|
||||||
}:
|
}:
|
||||||
let iface = "virtio";
|
let iface = "virtio";
|
||||||
|
@ -153,6 +153,8 @@ let
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
${postInstallCommands}
|
||||||
|
|
||||||
with subtest("Shutdown system after installation"):
|
with subtest("Shutdown system after installation"):
|
||||||
machine.succeed("umount -R /mnt")
|
machine.succeed("umount -R /mnt")
|
||||||
machine.succeed("sync")
|
machine.succeed("sync")
|
||||||
|
@ -368,7 +370,9 @@ let
|
||||||
|
|
||||||
|
|
||||||
makeInstallerTest = name:
|
makeInstallerTest = name:
|
||||||
{ createPartitions, preBootCommands ? "", postBootCommands ? "", extraConfig ? ""
|
{ createPartitions
|
||||||
|
, postInstallCommands ? "", preBootCommands ? "", postBootCommands ? ""
|
||||||
|
, extraConfig ? ""
|
||||||
, extraInstallerConfig ? {}
|
, extraInstallerConfig ? {}
|
||||||
, bootLoader ? "grub" # either "grub" or "systemd-boot"
|
, bootLoader ? "grub" # either "grub" or "systemd-boot"
|
||||||
, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false
|
, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false
|
||||||
|
@ -479,7 +483,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = testScriptFun {
|
testScript = testScriptFun {
|
||||||
inherit bootLoader createPartitions preBootCommands postBootCommands
|
inherit bootLoader createPartitions postInstallCommands preBootCommands postBootCommands
|
||||||
grubDevice grubIdentifier grubUseEfi extraConfig
|
grubDevice grubIdentifier grubUseEfi extraConfig
|
||||||
testSpecialisationConfig testFlakeSwitch;
|
testSpecialisationConfig testFlakeSwitch;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue