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