From: Alain Spineux Date: Fri, 26 Nov 2021 09:52:16 +0000 (+0100) Subject: regress: fix stop_bacula in scripts/functions X-Git-Tag: Beta-15.0.0~734 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdd382eb64964c9c0e66ef2430f306cd023c99a1;p=thirdparty%2Fbacula.git regress: fix stop_bacula in scripts/functions - bacula was not stopped when some type of error was detected - setup estate=1 and let end_test handle the error --- diff --git a/regress/scripts/functions b/regress/scripts/functions index 6e16427ff..9377b4f7e 100755 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -648,14 +648,15 @@ EOF if [ $? -ne 0 ]; then echo "ERROR: Unable to validate json output in $tmp/1.json"; cat $tmp/1.json - exit 1 + estat=1 + break else nb=`expr $nb + 1` fi done < $tmp/json.$$.list if [ $nb = 0 ]; then echo "ERROR: Unable to find json output in $tmp/json.$$.out" - exit 1 + estat=1 fi fi if [ "$CHECK_OPENFILE" != 0 ]; then @@ -681,7 +682,7 @@ EOF echo " !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out echo " Files still open!!" >>test.out echo " " - exit 1 + estat=1 fi fi fi @@ -696,7 +697,7 @@ EOF echo " !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out echo " JobMedia is corrupted" >>test.out echo " " - exit 1 + estat=1 fi fi if [ "$CHECK_ENCRYPTION" != 0 -a "$FORCE_ENCRYPTION" = yes ]; then @@ -710,7 +711,7 @@ EOF echo " !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out echo " Encryption problem" >>test.out echo " " - exit 1 + estat=1 fi fi if [ "$CHECK_JSON" != 0 ]; then @@ -724,7 +725,7 @@ EOF echo " !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out echo " JSON Data is incorrect" >>test.out echo " " - exit 1 + estat=1 fi fi if [ "x$FORCE_CLOUD" = xyes ]; then @@ -763,7 +764,7 @@ EOF echo " !!!!! $TestName ${variant_name} failed!!! `date +%R:%S` !!!!! " >>test.out echo " SCSI lock still set" >>test.out echo " " - exit 1 + estat=1 fi }