fix install test
This commit is contained in:
@@ -21,12 +21,6 @@ in
|
|||||||
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
|
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
fileSystems."/nix/store" = lib.mkForce {
|
|
||||||
device = "nix-store";
|
|
||||||
fsType = "9p";
|
|
||||||
neededForBoot = true;
|
|
||||||
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
|
|
||||||
};
|
|
||||||
clan.diskLayouts.singleDiskExt4.device = "/dev/vdb";
|
clan.diskLayouts.singleDiskExt4.device = "/dev/vdb";
|
||||||
|
|
||||||
environment.etc."install-successful".text = "ok";
|
environment.etc."install-successful".text = "ok";
|
||||||
@@ -92,16 +86,16 @@ in
|
|||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
def create_test_machine(oldmachine=None, args={}): # taken from <nixpkgs/nixos/tests/installer.nix>
|
def create_test_machine(oldmachine=None, args={}): # taken from <nixpkgs/nixos/tests/installer.nix>
|
||||||
|
startCommand = "${pkgs.qemu_test}/bin/qemu-kvm"
|
||||||
|
startCommand += " -cpu max -m 1024 -virtfs local,path=/nix/store,security_model=none,mount_tag=nix-store"
|
||||||
|
startCommand += f' -drive file={oldmachine.state_dir}/empty0.qcow2,id=drive1,if=none,index=1,werror=report'
|
||||||
|
startCommand += ' -device virtio-blk-pci,drive=drive1'
|
||||||
machine = create_machine({
|
machine = create_machine({
|
||||||
"qemuFlags":
|
"startCommand": startCommand,
|
||||||
'-cpu max -m 1024 -virtfs local,path=/nix/store,security_model=none,mount_tag=nix-store,'
|
|
||||||
f' -drive file={oldmachine.state_dir}/empty0.qcow2,id=drive1,if=none,index=1,werror=report'
|
|
||||||
f' -device virtio-blk-pci,drive=drive1',
|
|
||||||
} | args)
|
} | args)
|
||||||
driver.machines.append(machine)
|
driver.machines.append(machine)
|
||||||
return machine
|
return machine
|
||||||
|
|
||||||
|
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
|
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
|
||||||
|
|||||||
Reference in New Issue
Block a user