]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/four-concurrent-jobs-tape
Updates
[bacula/bacula] / regress / tests / four-concurrent-jobs-tape
index 47ea37d0e63c11683892832bdddf1c609fba19ed..9831c6686f3b5a499d14f063b04cb1a4c5ccd026 100755 (executable)
@@ -2,6 +2,13 @@
 #
 # Run two jobs at the same time
 #
+debug=0
+if test "$debug" -eq 1 ; then
+  out="tee"
+else
+  out="output"
+fi
+
 cwd=`pwd`
 scripts/copy-tape-confs
 scripts/cleanup-tape
@@ -14,12 +21,11 @@ echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ==="
 echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ===" >>working/log
 echo " "
 
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
 messages
-@output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
+@$out tmp/log1.out
+label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
 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
@@ -33,7 +39,7 @@ 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,9 +47,17 @@ done
 yes
 wait
 messages
-@output
+@$out
 quit
 END_OF_DATA
+if test "$debug" -eq 1 ; then
+  bin/bacula start
+  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+else
+  bin/bacula start 2>&1 >/dev/null
+  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
+fi
+
 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