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