Correctly return error for run-tests.sh -r

In recent modification introducing the -r option for run-tests.sh,
there was a missing bit: When -r is used, the regression result is
not returned and the outcome is always considered as a success.

Fix it by correctly reporting the status.

Change-Id: If4e3c96d51037fbcf6d9d0e10a3dd3e12da77447
BUG: 1129939
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/10289
Tested-by: NetBSD Build System
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
Emmanuel Dreyfus 2015-04-17 18:06:17 +02:00 committed by Vijay Bellur
parent 2ae52207f4
commit aa87c31d8d

View File

@ -228,6 +228,7 @@ function main_and_retry()
{
RESFILE=`mktemp /tmp/${0##*/}.XXXXXX` || exit 1
main "$@" | tee ${RESFILE}
RET=$?
FAILED=$( awk '/Failed: /{print $1}' ${RESFILE} )
if [ "x${FAILED}" != "x" ] ; then
@ -239,9 +240,11 @@ function main_and_retry()
echo " *********************************"
echo ""
main ${FAILED}
RET=$?
fi
rm -f ${RESFILE}
return ${RET}
}
echo