File tree Expand file tree Collapse file tree 7 files changed +33
-20
lines changed Expand file tree Collapse file tree 7 files changed +33
-20
lines changed Original file line number Diff line number Diff line change 11{
22 pkgs ,
3+ linkFarm ,
4+ runCommandNoCCLocal ,
35 mkTestDerivationFromNixvimModule ,
46 makeNixvimWithModule ,
57} :
1921 let
2022 nvim = makeNixvimWithModule { inherit pkgs module ; } ;
2123 in
22- pkgs . runCommand "enable-except-in-tests-not-in-test"
24+ runCommandNoCCLocal "enable-except-in-tests-not-in-test"
2325 { printConfig = "${ nvim } /bin/nixvim-print-init" ; }
2426 ''
2527 if ! "$printConfig" | grep 'require("image").setup'; then
3133 touch $out
3234 '' ;
3335in
34- pkgs . linkFarm "enable-except-in-tests" [
36+ linkFarm "enable-except-in-tests" [
3537 {
3638 name = "in-test" ;
3739 path = inTest ;
Original file line number Diff line number Diff line change 1- { makeNixvimWithModule , pkgs } :
1+ {
2+ makeNixvimWithModule ,
3+ runCommandNoCCLocal ,
4+ } :
25let
36 firstStage = makeNixvimWithModule {
47 module = {
1013
1114 generated = secondStage . extend { extraConfigLua = "-- third stage" ; } ;
1215in
13- pkgs . runCommand "extend-test" { printConfig = "${ generated } /bin/nixvim-print-init" ; } ''
16+ runCommandNoCCLocal "extend-test" { printConfig = "${ generated } /bin/nixvim-print-init" ; } ''
1417 config=$($printConfig)
1518 for stage in "first" "second" "third"; do
1619 if ! "$printConfig" | grep -q -- "-- $stage stage"; then
Original file line number Diff line number Diff line change 1- { makeNixvimWithModule , pkgs } :
1+ {
2+ makeNixvimWithModule ,
3+ runCommandNoCCLocal ,
4+ } :
25let
36 defaultModule =
47 { regularArg , ... } :
2831 } ;
2932 } ;
3033in
31- pkgs . runCommand "special-arg-test" { printConfig = "${ generated } /bin/nixvim-print-init" ; } ''
34+ runCommandNoCCLocal "special-arg-test" { printConfig = "${ generated } /bin/nixvim-print-init" ; } ''
3235 config=$($printConfig)
3336 if ! "$printConfig" | grep -- '-- regularArg=regularValue'; then
3437 echo "Missing regularArg in config"
Original file line number Diff line number Diff line change 1- { makeNixvimWithModule , pkgs } :
1+ {
2+ makeNixvimWithModule ,
3+ runCommandNoCCLocal ,
4+ } :
25let
36 extraFiles = {
47 "one" . text = "one" ;
1215 } ;
1316 } ;
1417in
15- pkgs . runCommand "extra-files-test"
18+ runCommandNoCCLocal "extra-files-test"
1619 {
1720 root = build . config . build . extraFiles ;
1821 files = builtins . attrNames extraFiles ;
Original file line number Diff line number Diff line change 11# For shorter test iterations run the following in the root of the repo:
22# `echo ':b checks.${builtins.currentSystem}.lib-tests' | nix repl .`
33{
4- lib ,
5- pkgs ,
64 helpers ,
5+ lib ,
6+ runCommandNoCCLocal ,
7+ writeText ,
78} :
89let
910 luaNames = {
4546 ] ;
4647 } ;
4748
48- drv = pkgs . writeText "example-derivation" "hello, world!" ;
49+ drv = writeText "example-derivation" "hello, world!" ;
4950
50- results = pkgs . lib . runTests {
51+ results = lib . runTests {
5152 testToLuaObject = {
5253 expr = helpers . toLuaObject {
5354 foo = "bar" ;
@@ -412,11 +413,11 @@ let
412413 } ;
413414in
414415if results == [ ] then
415- pkgs . runCommand "lib-tests-success" { } "touch $out"
416+ runCommandNoCCLocal "lib-tests-success" { } "touch $out"
416417else
417- pkgs . runCommand "lib-tests-failure"
418+ runCommandNoCCLocal "lib-tests-failure"
418419 {
419- results = pkgs . lib . concatStringsSep "\n " (
420+ results = lib . concatStringsSep "\n " (
420421 builtins . map ( result : ''
421422 ${ result . name } :
422423 expected: ${ lib . generators . toPretty { } result . expected }
Original file line number Diff line number Diff line change 44 callTest ,
55 helpers ,
66 lib ? pkgs . lib ,
7+ linkFarm ,
78 pkgs ,
89 pkgsUnfree ,
910} :
@@ -54,14 +55,14 @@ lib.pipe (testFiles ++ [ exampleFiles ]) [
5455 } :
5556 {
5657 inherit name ;
57- path = pkgs . linkFarm name ( builtins . mapAttrs ( moduleToTest file ) cases ) ;
58+ path = linkFarm name ( builtins . mapAttrs ( moduleToTest file ) cases ) ;
5859 }
5960 ) )
6061 ( helpers . groupListBySize 10 )
6162 ( lib . imap1 (
6263 i : group : rec {
6364 name = "test-${ toString i } " ;
64- value = pkgs . linkFarm name group ;
65+ value = linkFarm name group ;
6566 }
6667 ) )
6768 builtins . listToAttrs
Original file line number Diff line number Diff line change 11{
2- pkgs ? import <nixpkgs> { } ,
3- lib ? pkgs . lib ,
2+ lib ,
3+ runCommandNoCCLocal ,
44} :
55let
66 inherit ( lib ) attrNames filter length ;
99 duplicates = filter ( name : nixpkgsList ? ${ name } ) ( attrNames nixvimList ) ;
1010 count = length duplicates ;
1111in
12- pkgs . runCommand "maintainers-test" { inherit count duplicates ; } ''
12+ runCommandNoCCLocal "maintainers-test" { inherit count duplicates ; } ''
1313 if [ $count -gt 0 ]; then
1414 echo "$count nixvim maintainers are also nixpkgs maintainers:"
1515 for name in $duplicates; do
You can’t perform that action at this time.
0 commit comments