]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/functions
Minor tweaks
[bacula/bacula] / regress / scripts / functions
index 940b3dd1e0e48839da4ca74477dd31933614e027..715f6fb4cb0dd5deed3d08ac8d8543bb77325457 100644 (file)
@@ -158,10 +158,11 @@ run_bacula()
 
 run_bconsole()
 {
+   bconsole_file=${1:-tmp/bconcmds}
    if test "$debug" -eq 1 ; then
-     cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf
+     cat $bconsole_file | $bin/bconsole -c bin/bconsole.conf
    else
-     cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
+     cat $bconsole_file | $bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
    fi
 }
 
@@ -202,6 +203,10 @@ bscan_libdbi()
 stop_bacula()
 {
    bin/bacula stop 2>&1 >/dev/null
+   zstat=0
+   bstat=0
+   rstat=0
+   dstat=0
 }
 
 check_for_zombie_jobs()
@@ -247,6 +252,11 @@ check_two_logs()
    if test $? -eq 0; then
       rstat=4
    fi
+   grep "Encoding error for database" tmp/log1.out > /dev/null
+   if test $? -eq 0; then
+      print_debug "Found database encoding error"
+      bstat=2
+   fi
 }
 
 check_restore_diff()
@@ -274,6 +284,7 @@ end_test()
    if [ $zstat != 0 ] ; then
       echo " "
       echo "  !!!!! $TestName failed!!! `date +%R:%S` !!!!! "
+      echo "   Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
       echo "  !!!!! $TestName failed!!! `date +%R:%S` !!!!! " >>test.out
       echo "   Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
       echo " "
@@ -283,7 +294,9 @@ end_test()
       echo " "
       echo " "
       echo "  !!!!! $TestName failed!!! `date +%R:%S` !!!!! "
+      echo "   Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
       echo "  !!!!! $TestName failed!!! `date +%R:%S` !!!!! " >>test.out
+      echo "   Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
       if [ $bstat != 0 -o $rstat != 0 ] ; then
          echo "  !!!!! Bad termination status       !!!!! "
          echo "  !!!!! Bad termination status       !!!!! " >>test.out
@@ -446,4 +459,3 @@ fi
 AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer}
 LD_LIBRARY_PATH=$bin:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
-