summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-05-12 15:34:46 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-05-12 16:55:47 -0400
commit6494eeb9aa03d37ebe3a00a0756db2c4c9d6a065 (patch)
treeab43408938fc543558d900415b86b2fe0a2a3b22 /tests.sh
parent46f2146bc3091fb18eee5f8e11cc791ed8d57be3 (diff)
downloadbfs-6494eeb9aa03d37ebe3a00a0756db2c4c9d6a065.tar.xz
tests: Exit immediately if fail() detects a crash
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests.sh b/tests.sh
index c7567bc..68b3a36 100755
--- a/tests.sh
+++ b/tests.sh
@@ -1118,8 +1118,8 @@ function fail() {
local STATUS="$?"
if ((STATUS > 125)); then
- return "$STATUS"
- elif ((STATUS)); then
+ exit "$STATUS"
+ elif ((STATUS > 0)); then
return 0
else
return 1