tests: Split off in a single derivation the lsp server test

This test is quite resource intensive, so let's split it to avoid
issues
This commit is contained in:
Quentin Boyer 2024-10-05 14:23:31 +02:00
parent 182ffa4583
commit cab6b0c9fe
3 changed files with 154 additions and 142 deletions

View file

@ -42,24 +42,37 @@ let
};
in
# We attempt to build & execute all configurations
lib.pipe (testFiles ++ [ exampleFiles ]) [
(builtins.map (
{
name,
file,
cases,
}:
{
inherit name;
path = pkgs.linkFarm name (builtins.mapAttrs (moduleToTest file) cases);
}
))
(helpers.groupListBySize 10)
(lib.imap1 (
i: group: rec {
name = "test-${toString i}";
value = pkgs.linkFarm name group;
}
))
builtins.listToAttrs
]
(lib.pipe
(
testFiles
++ [
exampleFiles
]
)
[
(builtins.map (
{
name,
file,
cases,
}:
{
inherit name;
path = pkgs.linkFarm name (builtins.mapAttrs (moduleToTest file) cases);
}
))
(helpers.groupListBySize 10)
(lib.imap1 (
i: group: rec {
name = "test-${toString i}";
value = pkgs.linkFarm name group;
}
))
builtins.listToAttrs
]
)
// {
all-lsp-servers = moduleToTest ./lsp-servers.nix "all-lsp-servers" (
import ./lsp-servers.nix { inherit pkgs; }
);
}