]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/ansi-label-tape
more mkdir -p changes
[bacula/bacula] / regress / tests / ansi-label-tape
index 28cd2325f1e312be550eaaa6828a375e77919ce9..ad9ab4451547b50fc076683b225744190f75acf1 100755 (executable)
@@ -12,36 +12,39 @@ TestName="ansi-label-tape"
 JobName=backuptape
 . scripts/functions
 
+require_tape_drive
+
 scripts/copy-tape-confs
 /bin/cp -f scripts/ansi-sd-tape.conf bin/bacula-sd.conf
 scripts/cleanup-tape
 
-echo "${cwd}/build" >/tmp/file-list
+echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
 start_test
 
 # Write out bconsole commands
-cat <<END_OF_DATA >tmp/bconcmds
-@output /dev/null
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out /dev/null
 messages
-@$out tmp/log1.out
-@#setdebug level=200 storage=DDS-4
-label storage=DDS-4 volume=Vol001 slot=0 pool=Default
+@$out ${cwd}/tmp/log1.out
+setdebug level=200 storage=tape
+label storage=tape volume=Vol001 slot=0 pool=Default
 purge volume=Vol001
-relabel pool=Default storage=DDS-4 oldVolume=Vol001 volume=Vol002 slot=0
+relabel pool=Default storage=tape oldVolume=Vol001 volume=Vol002 slot=0
 purge volume=Vol002
-relabel pool=Default storage=DDS-4 oldVolume=Vol002 volume=Vol001 slot=0
+relabel pool=Default storage=tape oldVolume=Vol002 volume=Vol001 slot=0
 run job=$JobName yes
-status storage=DDS-4
+status storage=tape
 @sleep 1
 wait
 messages
 @# 
 @# now do a restore
 @#
-@$out tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+@$out ${cwd}/tmp/log2.out
+setdebug level=200 storage=tape
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
 yes
 wait
 list volumes
@@ -49,7 +52,7 @@ messages
 END_OF_DATA
 
 run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
 stop_bacula
 
 #
@@ -58,12 +61,12 @@ stop_bacula
 touch ${cwd}/build/src/dird/*.c
 echo "test test" > ${cwd}/build/src/dird/xxx
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @$out /dev/null
 messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
 list volumes
-setdebug level=300 storage=DDS-4
+@#setdebug level=300 storage=tape
 run job=$JobName yes
 wait
 list volumes
@@ -71,19 +74,18 @@ messages
 @# 
 @# now do a second restore
 @#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
 list volumes
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
 yes
 wait
 list volumes
 messages
-@$out
 quit
 END_OF_DATA
 
 run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
 stop_bacula
 
 check_two_logs