diff options
author | tomsmeding <tom.smeding@gmail.com> | 2019-11-18 20:50:19 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2019-11-18 20:50:19 +0100 |
commit | 25e7ad45ea3498c706960ad8c1dde0d7f138e399 (patch) | |
tree | 511aff122fe011710fee66cf88bb7e52c2c6dc3b | |
parent | 205893bf518c8d40d16c3efbaf2dde441805a383 (diff) |
test.sh: Continue going if a test fails
-rwxr-xr-x | test.sh | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -2,8 +2,14 @@ set -euo pipefail stack build prog="$(stack path --local-install-root)/bin/lisp" +ok=1 for f in tests/*.lisp; do - echo "$f" - diff -u <("$prog" "$f") "$(sed 's/\.lisp$/.out/' <<<"$f")" + echo "- $f" + diff -u <("$prog" "$f") "$(sed 's/\.lisp$/.out/' <<<"$f")" || ok=0 done -echo "All OK" +if [[ $ok -eq 1 ]]; then + echo "All OK" +else + echo "Some tests failed!" + exit 1 +fi |