]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/btape-fill-tape
Final changes
[bacula/bacula] / regress / tests / btape-fill-tape
1 #!/bin/sh
2 #
3 # Test the fill command in btape
4 #
5 cwd=`pwd`
6 scripts/copy-tape-confs
7 scripts/cleanup-tape
8
9 echo "${cwd}/build" >/tmp/file-list
10
11 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
12 sed "s%# MaximumVolumeSize%  MaximumVolumeSize%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
13
14 echo " "
15 echo " "
16 echo " === Starting btape fill test ==="
17 echo " === Starting btape fill test ===" >>working/log
18 echo " "
19
20 bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA 2>&1 >tmp/log1.out
21 fill
22 s
23
24 quit
25 END_OF_DATA
26
27
28 grep "^The last block on the tape matches\. Test succeeded\." tmp/log1.out 2>&1 >/dev/null
29 if [ $? != 0 ] ; then
30    echo " "
31    echo " "
32    echo "  !!!!! btape fill test failed!!! !!!!! "
33    echo "  !!!!! btape fill test failed!!! !!!!! " >>test.out
34    echo " "
35 else
36    echo "  ===== btape fill test OK ===== "
37    echo "  ===== btape fill test OK ===== " >>test.out
38 #  scripts/cleanup
39 fi