nixos-rebuild: add installer test to passthru.tests

When something changes in nixos-rebuild, we must make sure the
installers still work, otherwise it might break existing setups.

The installer tests check whether nixos-rebuild works, so they are a
good lithmus test.
This commit is contained in:
Profpatsch 2022-03-08 18:01:40 +01:00
parent cb7bc7c60f
commit 5679b2b698

View File

@ -5,6 +5,7 @@
, gnugrep , gnugrep
, nix , nix
, lib , lib
, nixosTests
}: }:
let let
fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix; fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix;
@ -19,4 +20,9 @@ substituteAll {
nix_i686_linux = fallback.i686-linux; nix_i686_linux = fallback.i686-linux;
nix_aarch64_linux = fallback.aarch64-linux; nix_aarch64_linux = fallback.aarch64-linux;
path = lib.makeBinPath [ coreutils gnused gnugrep ]; path = lib.makeBinPath [ coreutils gnused gnugrep ];
# run some a simple installer tests to make sure nixos-rebuild still works for them
passthru.tests = {
simple-installer-test = nixosTests.installer.simple;
};
} }