summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-11-18 20:50:19 +0100
committertomsmeding <tom.smeding@gmail.com>2019-11-18 20:50:19 +0100
commit25e7ad45ea3498c706960ad8c1dde0d7f138e399 (patch)
tree511aff122fe011710fee66cf88bb7e52c2c6dc3b
parent205893bf518c8d40d16c3efbaf2dde441805a383 (diff)
test.sh: Continue going if a test fails
-rwxr-xr-xtest.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/test.sh b/test.sh
index 6b1971f..1e7137f 100755
--- a/test.sh
+++ b/test.sh
@@ -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