]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/backup-win32-tape
updates
[bacula/bacula] / regress / tests / backup-win32-tape
index 42772d695a648c50027a6e0533501b28e9d1d02b..36c556caa8bef4d0811ab96aae6b9e317651cc13 100755 (executable)
@@ -4,51 +4,47 @@
 #   to a tape then restore it, we do that twice to ensure that
 #   we can correctly append to a tape.
 #
-cwd=`pwd`
-scripts/copy-win32-confs
+TestName="backup-win32-tape"
+JobName=backupwintape
+. scripts/functions
+
+require_tape_drive_drive
+
 scripts/cleanup-tape
+scripts/copy-win32-confs
 
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
 
-echo " "
-echo " "
-echo " === Starting Backup Win32 tape test at `date +%R:%S` ==="
-echo " === Starting Backup Win32 tape test at `date +%R:%S` ===" >>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 >${cwd}/tmp/bconcmds
 @output /dev/null
 messages
-@tee tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
+@$out ${cwd}/tmp/log1.out
+label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
 run job=NightlySave yes
 @sleep 10
 status storage=DDS-4
+@sleep 30
+messages
 wait
 messages
 @# 
 @# now do a restore
 @#
-@#output tmp/log2.out
+@$outt ${cwd}/tmp/log2.out
 @#restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
 @#yes
 @#wait
 @#messages
 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=$?
-if [ $bstat != 0 ] ; then
-   echo " "
-   echo " "
-   echo "  !!!!! Backup Win32 tape test failed!!! !!!!! "
-   echo "  !!!!! Backup Win32 tape test failed!!! !!!!! " >>test.out
-   echo " "
-else
-   echo "  ===== Backup Win32 tape test OK ===== "
-   echo "  ===== Backup Win32 tape test OK ===== " >>test.out
-   scripts/cleanup
-fi
+
+run_bacula
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test