]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/win32-to-linux-tape
Merge branch 'master' into basejobv3
[bacula/bacula] / regress / tests / win32-to-linux-tape
index 7cced61b81dadcbf8e88d96aca244c0421e1e313..743945f4a7a896f6b68b443a27a634b38e052f8e 100755 (executable)
@@ -4,33 +4,28 @@
 #   to a tape then restore it, we do that twice to ensure that
 #   we can correctly append to a tape.
 #
-debug=1
-if test "$debug" -eq 1 ; then
-  out="tee"
-else
-  out="output"
-fi
+TestName="win32-to-linux-tape"
+JobName=AutoLabel
+. scripts/functions
+
+require_tape_drive
 
-cwd=`pwd`
 scripts/copy-win32-confs
 scripts/cleanup-tape
 
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
 
-echo " "
-echo " "
-echo " === Starting Win32 Backup tape test at `date +%R:%S` ==="
-echo " === Starting Win32 Backup tape test at `date +%R:%S` ===" >>working/log
-echo " "
+change_job $JobName
+start_test
 
 cat <<END_OF_DATA >tmp/bconcmds
-@output /dev/null
+@$out /dev/null
 messages
 @$out tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default drive=0
+label storage=tape volume=TestVolume001 slot=0 pool=Default drive=0
 run job=NightlySave yes
 @sleep 10
-status storage=DDS-4
+status storage=tape
 @sleep 30
 messages
 wait
@@ -39,34 +34,17 @@ messages
 @# now do a restore
 @#
 @$out tmp/log2.out
-restore where=c:/tmp/bacula-restores client=Tibs select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores client=Tibs select all storage=tape done
 yes
 wait
 messages
 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
+run_bacula
+check_for_zombie_jobs storage=tape
+stop_bacula
 
-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=$?
-if [ $bstat != 0 -o $rstat != 0 ] ; then
-   echo " "
-   echo " "
-   echo "  !!!!! Win32 Backup tape test failed!!! !!!!! "
-   echo "  !!!!! Win32 Backup tape test failed!!! !!!!! " >>test.out
-   echo " "
-else
-   echo "  ===== Win32 Backup tape test OK ===== "
-   echo "  ===== Win32 Backup tape test OK ===== " >>test.out
-#  scripts/cleanup
-fi
+check_two_logs
+# No diff for the moment
+dstat=0
+end_test