From c18741aa2f86907c0dcd7c455f905a97e9d20162 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Thu, 4 Feb 2016 14:32:12 +0530 Subject: tests: Add option to disable exit on failure By default run-tests.sh will quit after any test fails. If the user is interested to run all the tests then he/she will have to use the -c option. Change-Id: I99a0aafee280325114205b30ab3fd199978b28bb Signed-off-by: Raghavendra Talur Reviewed-on: http://review.gluster.org/13350 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- run-tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 7ea6316f022..4ec77a16037 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -6,6 +6,7 @@ export TZ=UTC force="no" retry="no" tests="" +exit_on_failure="yes" function check_dependencies() { @@ -224,6 +225,9 @@ function run_tests() RES=1 GENERATED_CORE="${GENERATED_CORE}${t} " fi + if [ $RES -ne 0 ] && [ x"$exit_on_failure" = "xyes" ] ; then + break; + fi fi done if [ ${RES} -ne 0 ] ; then @@ -238,12 +242,13 @@ function run_tests() } function parse_args () { - args=`getopt fr "$@"` + args=`getopt frc "$@"` set -- $args while [ $# -gt 0 ]; do case "$1" in -f) force="yes" ;; -r) retry="yes" ;; + -c) exit_on_failure="no" ;; --) shift; break;; esac shift -- cgit