From 1242ba2274927668497a77e1730ae676cec2e7ac Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Thu, 7 Aug 2025 21:19:22 -0700 Subject: [PATCH] improve testing infra --- flake.nix | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 04ea249..64222f5 100644 --- a/flake.nix +++ b/flake.nix @@ -222,9 +222,24 @@ }; }; - tests = import ./tests/tests.nix { - inherit pkgs lib; - config = self.nixosConfigurations.muffin.config; - }; + packages.${system} = + let + testSuite = import ./tests/tests.nix { + inherit pkgs lib; + config = self.nixosConfigurations.muffin.config; + }; + in + { + tests = pkgs.linkFarm "all-tests" ( + pkgs.lib.mapAttrsToList (name: test: { + name = name; + path = test; + }) testSuite + ); + } + // (pkgs.lib.mapAttrs' (name: test: { + name = "test-${name}"; + value = test; + }) testSuite); }; }