Skip to content

Commit

Permalink
tests: Remove the test link farm
Browse files Browse the repository at this point in the history
  • Loading branch information
traxys committed Jul 21, 2024
1 parent e80a887 commit b157636
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 38 deletions.
62 changes: 31 additions & 31 deletions flake-modules/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,42 @@
...
}:
{
checks = {
tests = import ../tests {
inherit
pkgs
pkgsUnfree
helpers
makeNixvimWithModule
;
};

extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};
checks =
{
extra-args-tests = import ../tests/extra-args.nix {
inherit pkgs;
inherit makeNixvimWithModule;
};

extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };
extend = import ../tests/extend.nix { inherit pkgs makeNixvimWithModule; };

extra-files = import ../tests/extra-files.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;
};
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}";
};
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;
};
lib-tests = import ../tests/lib-tests.nix {
inherit pkgs helpers;
inherit (pkgs) lib;
};

maintainers = import ../tests/maintainers.nix { inherit pkgs; };
};
maintainers = import ../tests/maintainers.nix { inherit pkgs; };
}
// (import ../tests {
inherit
pkgs
pkgsUnfree
helpers
makeNixvimWithModule
;
});
};
}
15 changes: 8 additions & 7 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ let
}
];
};

# We attempt to build & execute all configurations
derivationList = builtins.map (
in
# We attempt to build & execute all configurations
builtins.listToAttrs (
builtins.map (
{ name, cases }:

let
# The test case can either be the actual definition,
# or a child attr named `module`.
Expand All @@ -47,7 +49,7 @@ let
in
{
inherit name;
path = mkTestDerivationFromNixvimModule {
value = mkTestDerivationFromNixvimModule {
inherit name;
tests = builtins.map (
{ name, case }:
Expand All @@ -62,6 +64,5 @@ let
pkgs = pkgsUnfree;
};
}
) (testFiles ++ [ exampleFiles ]);
in
pkgs.linkFarm "nixvim-tests" derivationList
) (testFiles ++ [ exampleFiles ])
)

0 comments on commit b157636

Please sign in to comment.