File tree Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Expand file tree Collapse file tree 1 file changed +20
-16
lines changed Original file line number Diff line number Diff line change 1
1
# Collects the various test modules in tests/test-sources/ and groups them into a number of test derivations
2
2
{
3
- callPackage ,
4
3
callTest ,
5
4
helpers ,
6
5
lib ? pkgs . lib ,
11
10
} :
12
11
let
13
12
fetchTests = callTest ./fetch-tests.nix { } ;
14
- test-derivation = callPackage ../lib/tests.nix {
15
- inherit lib self system ;
13
+
14
+ # Use a single common instance of nixpkgs, with allowUnfree
15
+ # Having a single shared instance should speed up tests a little
16
+ pkgsForTest = import self . inputs . nixpkgs {
17
+ inherit system ;
18
+ config . allowUnfree = true ;
16
19
} ;
17
- inherit ( test-derivation ) mkTestDerivationFromNixvimModule ;
18
20
19
21
moduleToTest =
20
22
file : name : module :
21
- mkTestDerivationFromNixvimModule {
22
- inherit name ;
23
- module = {
24
- _file = file ;
25
- imports = [ module ] ;
26
- } ;
27
- # Use a single common instance of nixpkgs, with allowUnfree
28
- # Having a single shared instance should speed up tests a little
29
- pkgs = import self . inputs . nixpkgs {
30
- inherit system ;
31
- config . allowUnfree = true ;
23
+ let
24
+ configuration = lib . nixvim . modules . evalNixvim {
25
+ modules = [
26
+ {
27
+ test . name = lib . mkDefault name ;
28
+ _module . args . pkgs = lib . mkForce pkgsForTest ;
29
+ }
30
+ {
31
+ _file = file ;
32
+ imports = lib . toList module ;
33
+ }
34
+ ] ;
32
35
} ;
33
- } ;
36
+ in
37
+ configuration . config . build . test ;
34
38
35
39
# List of files containing configurations
36
40
testFiles = fetchTests ./test-sources ;
You can’t perform that action at this time.
0 commit comments