From 5679b2b6987329910aea97458c4fa01e62f1e340 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 8 Mar 2022 18:01:40 +0100 Subject: [PATCH] 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. --- pkgs/os-specific/linux/nixos-rebuild/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/os-specific/linux/nixos-rebuild/default.nix b/pkgs/os-specific/linux/nixos-rebuild/default.nix index 08bba5a428d1..58712835d60f 100644 --- a/pkgs/os-specific/linux/nixos-rebuild/default.nix +++ b/pkgs/os-specific/linux/nixos-rebuild/default.nix @@ -5,6 +5,7 @@ , gnugrep , nix , lib +, nixosTests }: let fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix; @@ -19,4 +20,9 @@ substituteAll { nix_i686_linux = fallback.i686-linux; nix_aarch64_linux = fallback.aarch64-linux; 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; + }; }