From 8ebce63228c7fe1b622d4256dbf579ae17482054 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Wed, 6 May 2026 21:16:58 +0200 Subject: [PATCH] tests: register dynamically-created machines with the driver The nixpkgs test driver was refactored: `driver.machines` is now a computed property that returns a fresh sorted list combining `driver.machines_qemu` and `driver.machines_nspawn`. Appending to the property therefore mutates only the temporary returned list, so the machines created via `create_test_machine` are no longer registered with the driver. --- lib/tests.nix | 2 +- tests/disko-install/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests.nix b/lib/tests.nix index 2c75699..fdc79bd 100644 --- a/lib/tests.nix +++ b/lib/tests.nix @@ -342,7 +342,7 @@ let ] ''} machine = create_machine(start_command=" ".join(start_command), **kwargs) - driver.machines.append(machine) + driver.machines_qemu.append(machine) return machine machine.start() diff --git a/tests/disko-install/default.nix b/tests/disko-install/default.nix index 9999ba2..244baa9 100644 --- a/tests/disko-install/default.nix +++ b/tests/disko-install/default.nix @@ -48,7 +48,7 @@ pkgs.testers.nixosTest { "virtio-blk-pci,drive=drive1", ] machine = create_machine(start_command=" ".join(start_command), **kwargs) - driver.machines.append(machine) + driver.machines_qemu.append(machine) return machine machine.succeed("lsblk >&2")