···
pkgs ? import ../.. { inherit system config; }
6
-
with import ../lib/testing.nix { inherit system pkgs; };
6
+
with import ../lib/testing-python.nix { inherit system pkgs; };
···
}).config.system.build.isoImage;
20
-
perlAttrs = params: "{ ${concatStringsSep ", " (mapAttrsToList (name: param: "${name} => ${builtins.toJSON param}") params)} }";
20
+
pythonDict = params: "\n {\n ${concatStringsSep ",\n " (mapAttrsToList (name: param: "\"${name}\": \"${param}\"") params)},\n }\n";
makeBootTest = name: extraConfig:
24
-
machineConfig = perlAttrs ({ qemuFlags = "-m 768"; } // extraConfig);
24
+
machineConfig = pythonDict ({ qemuFlags = "-m 768"; } // extraConfig);
···
32
-
my $machine = createMachine(${machineConfig});
34
-
$machine->waitForUnit("multi-user.target");
35
-
$machine->succeed("nix verify -r --no-trust /run/current-system");
32
+
machine = create_machine(${machineConfig})
34
+
machine.wait_for_unit("multi-user.target")
35
+
machine.succeed("nix verify -r --no-trust /run/current-system")
37
-
# Test whether the channel got installed correctly.
38
-
$machine->succeed("nix-instantiate --dry-run '<nixpkgs>' -A hello");
39
-
$machine->succeed("nix-env --dry-run -iA nixos.procps");
37
+
with subtest("Check whether the channel got installed correctly"):
38
+
machine.succeed("nix-instantiate --dry-run '<nixpkgs>' -A hello")
39
+
machine.succeed("nix-env --dry-run -iA nixos.procps")
···
config.system.build.netbootIpxeScript
63
-
machineConfig = perlAttrs ({
63
+
machineConfig = pythonDict ({
qemuFlags = "-boot order=n -m 2000";
netBackendArgs = "tftp=${ipxeBootDir},bootfile=netboot.ipxe";
···
name = "boot-netboot-" + name;
73
-
my $machine = createMachine(${machineConfig});
75
-
$machine->waitForUnit("multi-user.target");
72
+
machine = create_machine(${machineConfig})
74
+
machine.wait_for_unit("multi-user.target")