tests/eval-test: exit on failed evaluation, skip some paths

This commit is contained in:
Yegor Timoshenko 2017-12-24 13:57:47 +00:00
parent a95291d21d
commit f35389f469
No known key found for this signature in database
GPG key ID: C34BF9DCC9DF8210

View file

@ -1,8 +1,27 @@
#!/bin/sh #!/bin/sh
cd $(dirname $0) cd $(dirname $0)/..
for profile in $(find .. -name \*.nix); do skip_paths=(
echo $profile >&2 ./inversepath/usbarmory/*
nixos-rebuild -I nixos-config=eval-test.nix -I nixos-hardware-profile=$profile dry-build ./tests/*
)
find=(find . -name *.nix)
for path in ${skip_paths[@]}; do
find+=(-not -path $path)
done
for profile in `${find[@]}`; do
echo evaluating $profile >&2
nixos-rebuild \
-I nixos-config=tests/eval-test.nix \
-I nixos-hardware-profile=$profile \
dry-build
if [ $? -ne 0 ]; then
exit 1
fi
done done