mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
tests: group tests by 10
Attempt to find a middle ground between having a single link-farm and one test per file. This groups up to ten tests per (roughly) 28 link-farms.
This commit is contained in:
parent
8f99c3953c
commit
69c2fa866e
1 changed files with 15 additions and 8 deletions
|
@ -37,10 +37,9 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# We attempt to build & execute all configurations
|
# We attempt to build & execute all configurations
|
||||||
builtins.listToAttrs (
|
lib.pipe (testFiles ++ [ exampleFiles ]) [
|
||||||
builtins.map (
|
(builtins.map (
|
||||||
{ name, cases }:
|
file:
|
||||||
|
|
||||||
let
|
let
|
||||||
# The test case can either be the actual definition,
|
# The test case can either be the actual definition,
|
||||||
# or a child attr named `module`.
|
# or a child attr named `module`.
|
||||||
|
@ -59,8 +58,16 @@ builtins.listToAttrs (
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "test-${name}";
|
inherit (file) name;
|
||||||
value = pkgs.linkFarm "test-${name}" (lib.map mkTest cases);
|
path = pkgs.linkFarm file.name (builtins.map mkTest file.cases);
|
||||||
}
|
}
|
||||||
) (testFiles ++ [ exampleFiles ])
|
))
|
||||||
)
|
(helpers.groupListBySize 10)
|
||||||
|
(lib.imap1 (
|
||||||
|
i: group: rec {
|
||||||
|
name = "test-${toString i}";
|
||||||
|
value = pkgs.linkFarm name group;
|
||||||
|
}
|
||||||
|
))
|
||||||
|
builtins.listToAttrs
|
||||||
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue