]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/four-concurrent-jobs-test
Update
[bacula/bacula] / regress / tests / four-concurrent-jobs-test
index fbcf54798d537e96d1eafa30824f67d002e4e259..95d1368525c4387dc50a226460d50038c5f4044a 100755 (executable)
@@ -6,21 +6,15 @@ cwd=`pwd`
 scripts/copy-test-confs
 scripts/cleanup
 echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
-cd ..
 
 echo " "
 echo " "
-echo " === Starting four-concurrent-jobs-test  ==="
-echo " === Starting four-concurrent-jobs-test  ===" >>working/log
+echo " === Starting four-concurrent-jobs-test at `date +%R:%S` ==="
+echo " === Starting four-concurrent-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
 messages
 @output tmp/log1.out
@@ -30,20 +24,31 @@ label storage=File1
 TestVolume002
 update Volume=TestVolume001 MaxVolBytes=100000000
 @#50000000
-12
+@#12
 run job=NightlySave level=Full Storage=File1
 yes
+reload
 run job=NightlySave level=Full Storage=File1
 yes
+reload
 run job=NightlySave level=Full Storage=File1
 yes
+reload
 run job=NightlySave level=Full Storage=File1
 yes
+reload
+reload
+reload
+reload
 @sleep 2
 status dir
+reload
 @sleep 5
 messages
+reload
+reload
 wait
+reload
 messages
 @# 
 @# now do a restore
@@ -55,6 +60,8 @@ mark *
 done
 yes
 wait
+reload
+reload
 messages
 @output
 quit
@@ -62,9 +69,9 @@ END_OF_DATA
 scripts/check_for_zombie_jobs storage=File1
 
 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
@@ -72,11 +79,18 @@ if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo "  !!!!! four-concurrent-jobs-test Bacula source failed!!! !!!!! "
    echo "  !!!!! four-concurrent-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 " "
    exit 1
 else
    echo "  ===== four-concurrent-jobs-test Bacula source OK ===== "
    echo "  ===== four-concurrent-jobs-test OK ===== " >>test.out
-   scripts/cleanup
+#  scripts/cleanup
    exit 0
 fi