]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/four-jobs-test
Update
[bacula/bacula] / regress / tests / four-jobs-test
index a312b386e6b1c9ac10bb55f43905ff6c1db9b2e9..ec9eb536488662f893b41c971e7dd8f2b6c1d01b 100755 (executable)
@@ -11,12 +11,12 @@ echo "${cwd}/build" >/tmp/file-list
 
 echo " "
 echo " "
-echo " === Starting four-jobs-test  ==="
-echo " === Starting four-jobs-test  ===" >>working/log
+echo " === Starting four-jobs-test at `date +%R:%S` ==="
+echo " === Starting four-jobs-test at `date +%R:%S` ===" >>working/log
 echo " "
 
 bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 estimate job=CompressedTest listing
 estimate job=CompressedTest listing
@@ -38,7 +38,7 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
 #
 # run a second job
 #
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 messages
 @output tmp/log1.out
@@ -55,7 +55,7 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
 #
 # run a third job
 #
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 messages
 @output tmp/log1.out
@@ -72,7 +72,7 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o
 #
 # run a fourth job
 #
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 messages
 @output tmp/log1.out
@@ -87,7 +87,7 @@ echo "Backup 4 done"
 # 
 # now do several restores to ensure we cleanup between jobs
 #
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 restore where=${cwd}/tmp/bacula-restores select all storage=File done
 yes
@@ -108,9 +108,9 @@ quit
 END_OF_DATA
 scripts/check_for_zombie_jobs storage=File
 bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
 bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+grep "^  Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
 rstat=$?
 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
@@ -118,6 +118,13 @@ if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo "  !!!!! four-jobs-test Bacula source failed!!! !!!!! "
    echo "  !!!!! four-jobs-test failed!!! !!!!! " >>test.out
+   if [ $bstat != 0 -o $rstat != 0 ] ; then
+      echo "  !!!!! Bad Job termination status     !!!!! "
+      echo "  !!!!! Bad Job termination status     !!!!! " >>test.out
+   else
+      echo "  !!!!! Restored files differ          !!!!! "
+      echo "  !!!!! Restored files differ          !!!!! " >>test.out
+   fi
    echo " "
 else
    echo "  ===== four-jobs-test Bacula source OK ===== "