]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/four-concurrent-jobs-tape
Update disk tests
[bacula/bacula] / regress / tests / four-concurrent-jobs-tape
index 4f369df81c2657379bc89b48bb043cb4436d12f3..d841bedaa1abfbe573a4f7a7f517b9a5901cfa40 100755 (executable)
@@ -2,38 +2,40 @@
 #
 # Run two jobs at the same time
 #
-cwd=`pwd`
+TestName="auto-label-test"
+JobName=AutoLabel
+. scripts/functions
+set_debug 0
+
 scripts/copy-tape-confs
 scripts/cleanup-tape
 
 echo "${cwd}/build" >/tmp/file-list
 
-echo " "
-echo " "
-echo " === Starting four-concurrent-jobs-tape  ==="
-echo " === Starting four-concurrent-jobs-tape  ===" >>working/log
-echo " "
+change_jobname $JobName
+start_test
 
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+cat <<END_OF_DATA >tmp/bconcmds
 @output /dev/null
 messages
-@output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
-run job=NightlySave level=Full Storage=DDS-4 yes
-run job=NightlySave level=Full Storage=DDS-4 yes
-run job=NightlySave level=Full Storage=DDS-4 yes
-run job=NightlySave level=Full Storage=DDS-4 yes
+@$out tmp/log1.out
+label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+run job=$JobName level=Full Storage=DDS-4 yes
+run job=$JobName level=Full Storage=DDS-4 yes
+run job=$JobName level=Full Storage=DDS-4 yes
+run job=$JobName level=Full Storage=DDS-4 yes
 @sleep 2
 status dir
 @sleep 5
+status dir
+status storage=DDS-4
 messages
 wait
 messages
 @# 
 @# now do a restore
 @#
-@output tmp/log2.out
+@$out tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
 unmark *
 mark *
@@ -41,26 +43,14 @@ done
 yes
 wait
 messages
-@output
+@$out
 quit
 END_OF_DATA
-scripts/check_for_zombie_jobs storage=DDS-4
-bin/bacula stop 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
-rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
-   echo " "
-   echo " "
-   echo "  !!!!! four-concurrent-jobs-tape Bacula source failed!!! !!!!! "
-   echo "  !!!!! four-concurrent-jobs-tape failed!!! !!!!! " >>test.out
-   echo " "
-   exit 1
-else
-   echo "  ===== four-concurrent-jobs-tape Bacula source OK ===== "
-   echo "  ===== four-concurrent-jobs-tape OK ===== " >>test.out
-   scripts/cleanup
-   exit 0
-fi
+
+run_bacula
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test