# Test the fill command in btape
#
TestName="btape-fill-full-tape"
-JobName=AutoLabel
+JobName=btape-fill
. scripts/functions
-scripts/copy-tape-confs
+require_tape_drive
+
+scripts/copy-btape-confs
scripts/cleanup-tape
change_jobname $JobName
start_test
-bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA 2>&1 >${cwd}/tmp/log1.out
+#
+# Increase block size to 262144
+#
+cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
+sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
+
+
+if test "$debug" -eq 1 ; then
+ $bin/btape -c bin/bacula-sd.conf Drive-0 <<END_OF_DATA | tee ${cwd}/tmp/log1.out
fill
s
quit
END_OF_DATA
+else
+ $bin/btape -c bin/bacula-sd.conf Drive-0 <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
+fill
+s
+quit
+END_OF_DATA
+fi
-grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out 2>&1 >/dev/null
+grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out >/dev/null 2>&1
if [ $? != 0 ] ; then
echo " "
echo " "