nixos/tests/installer: add postInstallCommands to makeInstallerTest

authored by misuzu.tngl.sh and committed by

Jörg Thalheim b8a547d3 858c6b93

+8 -4
+8 -4
nixos/tests/installer.nix
··· 69 # disk, and then reboot from the hard disk. It's parameterized with 70 # a test script fragment `createPartitions', which must create 71 # partitions and filesystems. 72 - testScriptFun = { bootLoader, createPartitions, grubDevice, grubUseEfi 73 - , grubIdentifier, preBootCommands, postBootCommands, extraConfig 74 , testSpecialisationConfig, testFlakeSwitch 75 }: 76 let iface = "virtio"; ··· 152 }' 153 """ 154 ) 155 156 with subtest("Shutdown system after installation"): 157 machine.succeed("umount -R /mnt") ··· 368 369 370 makeInstallerTest = name: 371 - { createPartitions, preBootCommands ? "", postBootCommands ? "", extraConfig ? "" 372 , extraInstallerConfig ? {} 373 , bootLoader ? "grub" # either "grub" or "systemd-boot" 374 , grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false ··· 479 }; 480 481 testScript = testScriptFun { 482 - inherit bootLoader createPartitions preBootCommands postBootCommands 483 grubDevice grubIdentifier grubUseEfi extraConfig 484 testSpecialisationConfig testFlakeSwitch; 485 };
··· 69 # disk, and then reboot from the hard disk. It's parameterized with 70 # a test script fragment `createPartitions', which must create 71 # partitions and filesystems. 72 + testScriptFun = { bootLoader, createPartitions, grubDevice, grubUseEfi, grubIdentifier 73 + , postInstallCommands, preBootCommands, postBootCommands, extraConfig 74 , testSpecialisationConfig, testFlakeSwitch 75 }: 76 let iface = "virtio"; ··· 152 }' 153 """ 154 ) 155 + 156 + ${postInstallCommands} 157 158 with subtest("Shutdown system after installation"): 159 machine.succeed("umount -R /mnt") ··· 370 371 372 makeInstallerTest = name: 373 + { createPartitions 374 + , postInstallCommands ? "", preBootCommands ? "", postBootCommands ? "" 375 + , extraConfig ? "" 376 , extraInstallerConfig ? {} 377 , bootLoader ? "grub" # either "grub" or "systemd-boot" 378 , grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false ··· 483 }; 484 485 testScript = testScriptFun { 486 + inherit bootLoader createPartitions postInstallCommands preBootCommands postBootCommands 487 grubDevice grubIdentifier grubUseEfi extraConfig 488 testSpecialisationConfig testFlakeSwitch; 489 };