summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-02-04 14:32:12 +0530
committerRaghavendra Talur <rtalur@redhat.com>2016-02-08 00:31:41 -0800
commitc18741aa2f86907c0dcd7c455f905a97e9d20162 (patch)
tree44761c506f06031b3b0f7b99c763055c36e4279b
parent6d9a976e53136dd4acc3fb33384035af77dae24c (diff)
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 <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13350 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-rwxr-xr-xrun-tests.sh7
1 files changed, 6 insertions, 1 deletions
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