aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2011-02-19 12:15:16 +0200
committerPetri Lehtinen <petri@digip.org>2011-02-19 12:15:21 +0200
commite54ea1f7c904a5beef64ca0fe986cf7dc4f62296 (patch)
tree7b644395d2eb98028179f5ce70477be381da32d4
parent4be9e9e7fe54ae2fe6f63d39a8209b41e878196d (diff)
downloadjansson-e54ea1f7c904a5beef64ca0fe986cf7dc4f62296.zip
jansson-e54ea1f7c904a5beef64ca0fe986cf7dc4f62296.tar.gz
jansson-e54ea1f7c904a5beef64ca0fe986cf7dc4f62296.tar.bz2
tests: Use "make STOP=1 check" to stop on first failure
-rwxr-xr-xtest/run-suites3
-rw-r--r--test/scripts/run-tests.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/test/run-suites b/test/run-suites
index 6e5baf6..ea35424 100755
--- a/test/run-suites
+++ b/test/run-suites
@@ -20,6 +20,8 @@ if [ -z "$SUITES" ]; then
done
fi
+[ -z "$STOP" ] && STOP=0
+
export suites_srcdir=$top_srcdir/test/suites
export suites_builddir=suites
export scriptdir=$top_srcdir/test/scripts
@@ -34,6 +36,7 @@ for suite in $SUITES; do
passed=$(($passed+1))
else
failed=$(($failed+1))
+ [ $STOP -eq 1 ] && break
fi
done
diff --git a/test/scripts/run-tests.sh b/test/scripts/run-tests.sh
index 4a039e1..48dfae8 100644
--- a/test/scripts/run-tests.sh
+++ b/test/scripts/run-tests.sh
@@ -12,6 +12,7 @@ suite_log=$logdir/$suite_name
[ -z "$VERBOSE" ] && VERBOSE=0
+[ -z "$STOP" ] && STOP=0
. $scriptdir/valgrind.sh
@@ -47,6 +48,8 @@ for test_path in $suite_srcdir/*; do
else
echo -n "F"
fi
+
+ [ $STOP -eq 1 ] && break
fi
done