diff options
author | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-24 13:57:47 +0000 |
---|---|---|
committer | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-24 13:57:47 +0000 |
commit | f35389f4690e297c8f3cc0229f213aaaecc882b1 (patch) | |
tree | 59ac4139de18bb5f8a38024db81bf02cb455e3e6 /tests | |
parent | a95291d21d589156580f8bfdbed6190756a8f3ca (diff) |
tests/eval-test: exit on failed evaluation, skip some paths
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/eval-test.sh | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/tests/eval-test.sh b/tests/eval-test.sh index d3eb3a1..72d6341 100755 --- a/tests/eval-test.sh +++ b/tests/eval-test.sh @@ -1,8 +1,27 @@ #!/bin/sh -cd $(dirname $0) +cd $(dirname $0)/.. -for profile in $(find .. -name \*.nix); do - echo $profile >&2 - nixos-rebuild -I nixos-config=eval-test.nix -I nixos-hardware-profile=$profile dry-build +skip_paths=( + ./inversepath/usbarmory/* + ./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 |