]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/btape-fill-full-changer
Tweak correct English in debug output of regress tests
[bacula/bacula] / regress / tests / btape-fill-full-changer
1 #!/bin/sh
2 #
3 # Test the fill command in btape
4 #
5 TestName="btape-fill-full-changer"
6 JobName=btape-fill-changer
7 . scripts/functions
8
9 require_tape_drive
10 require_autochanger
11
12 scripts/cleanup
13 scripts/copy-btape-confs
14
15 change_jobname $JobName
16 start_test
17
18 #
19 #  Increase block size to 262144
20 #
21 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
22 sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
23 #
24 # Limit Volume size for debugging without waiting too long
25 #
26 # cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
27 # sed -e 's%# MaximumVolumeSize = 400M%  MaximumVolumeSize = 400M%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
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 m
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 m
40
41 quit
42 END_OF_DATA
43 fi
44
45 grep "^The last block on the second 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