Commit a5d6a5768f5537ef0a408cf51ce8c13742412041

Edward Thomson 2021-08-29T13:21:40

ci: stop on test failure

diff --git a/ci/test.sh b/ci/test.sh
index 2b43ba1..da3c01c 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -17,6 +17,7 @@ TMPDIR=${TMPDIR:-/tmp}
 USER=${USER:-$(whoami)}
 
 SUCCESS=1
+CONTINUE_ON_FAILURE=0
 
 cleanup() {
 	echo "Cleaning up..."
@@ -64,6 +65,10 @@ run_test() {
 	done
 
 	if [ "$FAILED" -ne 0 ]; then
+		if [ "$CONTINUE_ON_FAILURE" -ne 1 ]; then
+			exit 1
+		fi
+
 		SUCCESS=0
 	fi
 }