mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-24 01:24:57 +03:00
tests-examples: allow passing arguments
This commit is contained in:
parent
2fd96e44e9
commit
b5d473e2e8
@ -24,12 +24,13 @@
|
|||||||
]
|
]
|
||||||
''
|
''
|
||||||
dir=$1
|
dir=$1
|
||||||
|
shift
|
||||||
echo -e \"\ntesting example for $dir\"
|
echo -e \"\ntesting example for $dir\"
|
||||||
cp -r ${examples}/$dir/* .
|
cp -r ${examples}/$dir/* .
|
||||||
chmod -R +w .
|
chmod -R +w .
|
||||||
nix flake lock --override-input dream2nix ${../../.}
|
nix flake lock --override-input dream2nix ${../../.}
|
||||||
nix run .#resolveImpure
|
nix run .#resolveImpure
|
||||||
nix flake check
|
nix flake check "$@"
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
utils.writePureShellScript
|
utils.writePureShellScript
|
||||||
@ -41,6 +42,8 @@ in
|
|||||||
if [ -z ''${1+x} ]; then
|
if [ -z ''${1+x} ]; then
|
||||||
parallel -j$(nproc) -a <(ls ${examples}) ${testScript}
|
parallel -j$(nproc) -a <(ls ${examples}) ${testScript}
|
||||||
else
|
else
|
||||||
${testScript} $1
|
arg1=$1
|
||||||
|
shift
|
||||||
|
${testScript} $arg1 "$@"
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
Loading…
Reference in New Issue
Block a user