tests: Remove the test link farm

Fixes #1878
This commit is contained in:
traxys 2024-07-19 20:22:19 +02:00
parent e80a8874ac
commit b1576362a7
2 changed files with 39 additions and 38 deletions

View file

@ -10,42 +10,42 @@
... ...
}: }:
{ {
checks = { checks =
tests = import ../tests { {
extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};
extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };
extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };
enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
inherit pkgs makeNixvimWithModule;
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
};
no-flake = import ../tests/no-flake.nix {
inherit system;
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
nixvim = "${self}";
};
lib-tests = import ../tests/lib-tests.nix {
inherit pkgs helpers;
inherit (pkgs) lib;
};
maintainers = import ../tests/maintainers.nix { inherit pkgs; };
}
// (import ../tests {
inherit inherit
pkgs pkgs
pkgsUnfree pkgsUnfree
helpers helpers
makeNixvimWithModule makeNixvimWithModule
; ;
}; });
extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};
extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };
extra-files = import ../tests/extra-files.nix { inherit pkgs makeNixvimWithModule; };
enable-except-in-tests = import ../tests/enable-except-in-tests.nix {
inherit pkgs makeNixvimWithModule;
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
};
no-flake = import ../tests/no-flake.nix {
inherit system;
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
nixvim = "${self}";
};
lib-tests = import ../tests/lib-tests.nix {
inherit pkgs helpers;
inherit (pkgs) lib;
};
maintainers = import ../tests/maintainers.nix { inherit pkgs; };
};
}; };
} }

View file

@ -35,10 +35,12 @@ let
} }
]; ];
}; };
in
# We attempt to build & execute all configurations # We attempt to build & execute all configurations
derivationList = builtins.map ( builtins.listToAttrs (
builtins.map (
{ name, cases }: { name, cases }:
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`.
@ -47,7 +49,7 @@ let
in in
{ {
inherit name; inherit name;
path = mkTestDerivationFromNixvimModule { value = mkTestDerivationFromNixvimModule {
inherit name; inherit name;
tests = builtins.map ( tests = builtins.map (
{ name, case }: { name, case }:
@ -62,6 +64,5 @@ let
pkgs = pkgsUnfree; pkgs = pkgsUnfree;
}; };
} }
) (testFiles ++ [ exampleFiles ]); ) (testFiles ++ [ exampleFiles ])
in )
pkgs.linkFarm "nixvim-tests" derivationList