summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-23 11:51:14 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-23 13:06:34 -0500
commitdcf18f988e7737a5bbb77618da99cc5dc7035539 (patch)
tree0a9a0bcf90a8900fa3d22c14f631f3db34e5c850
parentd79b7be41ea85cf52a724e348d1911a19503e959 (diff)
downloadbfs-dcf18f988e7737a5bbb77618da99cc5dc7035539.tar.xz
tests: Fix --stop
-rw-r--r--tests/run.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/run.sh b/tests/run.sh
index c7e819a..785c414 100644
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -80,12 +80,15 @@ wait_test() {
case $ret in
0)
((++passed))
+ return 0
;;
$EX_SKIP)
((++skipped))
+ return 0
;;
*)
((++failed))
+ return $ret
;;
esac
}
@@ -126,6 +129,9 @@ run_tests() {
for TEST in "${TEST_CASES[@]}"; do
if ((BG >= JOBS)); then
wait_test
+ if (($? && STOP)); then
+ break
+ fi
fi
printf "$TEST_FMT" "$TEST"