From aa87c31d8d7406157af582c7aeafd5ed6a64fd2d Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 17 Apr 2015 18:06:17 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/10289 Tested-by: NetBSD Build System Reviewed-by: Jeff Darcy Tested-by: Gluster Build System --- run-tests.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'run-tests.sh') diff --git a/run-tests.sh b/run-tests.sh index 06fec4aa093..2a819dba656 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -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 -- cgit