mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 12:43:52 +00:00
nixos/tests: add nixos-rebuild-install-bootloader-ng
This commit is contained in:
parent
c27b1c401a
commit
81148841b9
@ -711,6 +711,7 @@ in {
|
||||
nixops = handleTest ./nixops/default.nix {};
|
||||
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
|
||||
nixos-rebuild-install-bootloader = handleTestOn ["x86_64-linux"] ./nixos-rebuild-install-bootloader.nix {};
|
||||
nixos-rebuild-install-bootloader-ng = handleTestOn ["x86_64-linux"] ./nixos-rebuild-install-bootloader.nix { withNg = true; };
|
||||
nixos-rebuild-specialisations = runTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix;
|
||||
nixos-rebuild-target-host = runTest ./nixos-rebuild-target-host.nix;
|
||||
nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; };
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
import ./make-test-python.nix ({ pkgs, lib, withNg ? false, ... }: {
|
||||
name = "nixos-rebuild-install-bootloader";
|
||||
|
||||
nodes = {
|
||||
@ -15,6 +15,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
};
|
||||
|
||||
system.includeBuildDependencies = true;
|
||||
system.rebuild.enableNg = withNg;
|
||||
|
||||
virtualisation = {
|
||||
cores = 2;
|
||||
@ -27,7 +28,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
|
||||
testScript =
|
||||
let
|
||||
configFile = pkgs.writeText "configuration.nix" ''
|
||||
configFile = pkgs.writeText "configuration.nix" /* nix */ ''
|
||||
{ lib, pkgs, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
@ -40,12 +41,13 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
forceInstall = true;
|
||||
};
|
||||
|
||||
system.rebuild.enableNg = ${lib.boolToString withNg};
|
||||
documentation.enable = false;
|
||||
}
|
||||
'';
|
||||
|
||||
in
|
||||
''
|
||||
/* python */ ''
|
||||
machine.start()
|
||||
machine.succeed("udevadm settle")
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
@ -4,6 +4,7 @@
|
||||
installShellFiles,
|
||||
mkShell,
|
||||
nix,
|
||||
nixosTests,
|
||||
python3,
|
||||
python3Packages,
|
||||
runCommand,
|
||||
@ -94,6 +95,7 @@ python3Packages.buildPythonApplication rec {
|
||||
};
|
||||
|
||||
tests = {
|
||||
inherit (nixosTests) nixos-rebuild-install-bootloader-ng;
|
||||
repl = callPackage ./tests/repl.nix { };
|
||||
# NOTE: this is a passthru test rather than a build-time test because we
|
||||
# want to keep the build closures small
|
||||
|
Loading…
Reference in New Issue
Block a user