tests: Refactor parts module

This commit is contained in:
SebastianStork 2026-02-14 23:53:12 +01:00
parent d92342ab4c
commit a3bae7baec
Signed by: SebastianStork
SSH key fingerprint: SHA256:iEM011ogNMG1q8+U500adGu/9rpPuZ2KnFtbdLeqTiI

View file

@ -2,27 +2,25 @@
{
perSystem =
{ pkgs, lib, ... }:
let
mkTest = dir: rec {
name = "${dir}-test";
value = pkgs.testers.runNixOSTest (
{
inherit name;
}
// import "${self}/tests/${dir}" {
inherit
inputs
self
pkgs
lib
;
}
);
};
in
{
checks =
"${self}/tests"
|> builtins.readDir
|> lib.attrNames
|> lib.map (name: {
name = "${name}-test";
value = pkgs.testers.runNixOSTest (
{
name = "${name}-test";
}
// import "${self}/tests/${name}" {
inherit
inputs
self
pkgs
lib
;
}
);
})
|> lib.listToAttrs;
checks = "${self}/tests" |> builtins.readDir |> lib.attrNames |> lib.map mkTest |> lib.listToAttrs;
};
}