From: Kern Sibbald Date: Sun, 15 Nov 2009 14:09:11 +0000 (+0100) Subject: Tweak base-job-test grep and doc failure statuses X-Git-Tag: Release-7.0.0~2570 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5fca871b8c7463efadc49d51e5208ae66431a98a;p=bacula%2Fbacula Tweak base-job-test grep and doc failure statuses --- diff --git a/regress/scripts/functions b/regress/scripts/functions index 65376f779a..72a2b1934b 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -27,6 +27,8 @@ start_test() echo " === Starting $TestName at `date +%R:%S` ===" >> ${working}/log echo " " export zstat + export estat + estat=0 zstat=0 bstat=0 rstat=0 @@ -157,6 +159,7 @@ run_bacula() { debug_wait zstat=0 + estat=0 if test "$debug" -eq 1 ; then ${scripts}/bacula-ctl-sd start -m ${scripts}/bacula-ctl-fd start -m $1 @@ -304,8 +307,23 @@ check_restore_tmp_build_diff() dstat=$? } +# bstat is backup error +# dstat is diff difference +# estat is special error status (shown by print_debug message) +# rstat is restore status +# zstat is zombie job(s) +# end_test() { + if [ $estat != 0 ] ; then + echo " " + echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " + echo " Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" + echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " >>test.out + echo " Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out + echo " " + exit 1 + fi if [ $zstat != 0 ] ; then echo " " echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " diff --git a/regress/tests/base-job-test b/regress/tests/base-job-test index 1882e66107..14f0b09bad 100755 --- a/regress/tests/base-job-test +++ b/regress/tests/base-job-test @@ -160,7 +160,7 @@ run_bconsole grep -e ' 0 *|' ${cwd}/tmp/log3.out > /dev/null if [ $? -ne 0 ]; then print_debug "Can't purge the base job" - dstat=2 + estat=1 fi @@ -183,13 +183,13 @@ END_OF_DATA run_bconsole -grep po/fr.po ${cwd}/tmp/log5.out > /dev/null +grep "po/fr.po^" ${cwd}/tmp/log5.out > /dev/null if [ $? -eq 0 ]; then print_debug "Should not display fr.po as basefile" - bstat=2 + estat=2 fi -export bstat dstat +export bstat dstat estat stop_bacula end_test