mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
tests: use a link-farm again, but only per-file
This commit is contained in:
parent
379ae77a76
commit
9688ef723f
1 changed files with 12 additions and 14 deletions
|
@ -46,23 +46,21 @@ builtins.listToAttrs (
|
|||
# or a child attr named `module`.
|
||||
prepareModule = case: case.module or (lib.removeAttrs case [ "tests" ]);
|
||||
dontRunModule = case: case.tests.dontRun or false;
|
||||
in
|
||||
{
|
||||
name = "test-${name}";
|
||||
value = mkTestDerivationFromNixvimModule {
|
||||
inherit name;
|
||||
tests = builtins.map (
|
||||
mkTest =
|
||||
{ name, case }:
|
||||
{
|
||||
inherit name;
|
||||
path = mkTestDerivationFromNixvimModule {
|
||||
inherit name;
|
||||
module = prepareModule case;
|
||||
dontRun = dontRunModule case;
|
||||
}
|
||||
) cases;
|
||||
# Use the global dontRun only if we don't have a list of modules
|
||||
dontRun = dontRunModule cases;
|
||||
pkgs = pkgsUnfree;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "test-${name}";
|
||||
value = pkgs.linkFarm "test-${name}" (lib.map mkTest cases);
|
||||
}
|
||||
) (testFiles ++ [ exampleFiles ])
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue