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