]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/btape-fill-full-tape
regress: Add test for new PurgeMigrateJob option
[bacula/bacula] / regress / tests / btape-fill-full-tape
1 #!/bin/sh
2 #
3 # Test the fill command in btape
4 #
5 TestName="btape-fill-full-tape"
6 JobName=btape-fill
7 . scripts/functions
8
9 require_tape_drive
10
11 scripts/copy-btape-confs
12 scripts/cleanup-tape
13
14 change_jobname $JobName
15 start_test
16
17 #
18 #  Increase block size to 262144
19 #
20 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
21 sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
22
23
24 if test "$debug" -eq 1 ; then
25    $bin/btape -c bin/bacula-sd.conf Drive-0 <<END_OF_DATA | tee ${cwd}/tmp/log1.out
26 fill
27 s
28
29 quit
30 END_OF_DATA
31 else
32    $bin/btape -c bin/bacula-sd.conf Drive-0 <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
33 fill
34 s
35
36 quit
37 END_OF_DATA
38 fi
39
40 grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out >/dev/null 2>&1
41 if [ $? != 0 ] ; then
42    echo " "
43    echo " "
44    echo "  !!!!! btape fill test failed!!! !!!!! "
45    echo "  !!!!! btape fill test failed!!! !!!!! " >>test.out
46    echo " "
47 else
48    echo "  ===== btape fill test OK ===== "
49    echo "  ===== btape fill test OK ===== " >>test.out
50 #  scripts/cleanup
51 fi