# to a tape where the maximum tape file size is set to 1M
#
cwd=`pwd`
-bin/bacula stop 2>&1 >/dev/null
scripts/copy-tape-confs
scripts/cleanup-tape
+
echo "${cwd}/build" >/tmp/file-list
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
-out="tmp/sed_tmp"
-echo "s%# Maximum File Size% Maximum File Size%g" >${out}
cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
-sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
+sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
echo " "
echo " "
-echo " === Starting Small File Size test ==="
-echo " === Starting Small File Size test ===" >>working/log
+echo " === Starting Small File Size test at `date +%R:%S` ==="
+echo " === Starting Small File Size test at `date +%R:%S` ===" >>working/log
echo " "
bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
@output /dev/null
messages
@output tmp/log1.out
-label storage=DDS-4 volume=TestVolume001 slot=0
+label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+setdebug level=2 storage=DDS-4
run job=NightlySave yes
wait
messages
@# now do a restore
@#
@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores current all
+restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+unmark *
+mark *
+done
yes
wait
messages
@output
quit
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
+grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
rstat=$?
-diff -r build tmp/bacula-restores${cwd}/build
+diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
echo " "
echo " "