3 # Test if Bacula can automatically create a Volume label.
7 if test "$debug" -eq 1 ; then
13 scripts/copy-test-confs
15 echo "${cwd}/build" >/tmp/file-list
17 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
18 sed "s%# Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
22 echo " === Starting auto-label-test at `date +%R:%S` ==="
23 echo " === Starting auto-label-test at `date +%R:%S` ===" >>working/log
26 cat <<END_OF_DATA >tmp/bconcmds
34 @#setdebug level=400 storage=File
35 run job=CompressedTest storage=File yes
44 restore where=${cwd}/tmp/bacula-restores select storage=File
64 if test "$debug" -eq 1 ; then
66 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
68 bin/bacula start 2>&1 >/dev/null
69 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
72 scripts/check_for_zombie_jobs storage=File
74 bin/bacula stop 2>&1 >/dev/null
75 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
77 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
79 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
80 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
83 echo " !!!!! auto-label-test failed!!! !!!!! "
84 echo " !!!!! auto-label-test failed!!! !!!!! " >>test.out
85 if [ $bstat != 0 -o $rstat != 0 ] ; then
86 echo " !!!!! Bad Job termination status !!!!! "
87 echo " !!!!! Bad Job termination status !!!!! " >>test.out
89 echo " !!!!! Restored files differ !!!!! "
90 echo " !!!!! Restored files differ !!!!! " >>test.out
94 echo " ===== auto-label-test OK ===== "
95 echo " ===== auto-label-test OK ===== " >>test.out