]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/btape-test-tape
Update tape tests for hardware certification
[bacula/bacula] / regress / tests / btape-test-tape
1 #!/bin/sh
2 #
3 # Test the test command in btape
4 #
5 TestName="btape-test-tape"
6 JobName=btapetest
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 if test "$debug" -eq 1 ; then
18   $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA
19 test
20 quit
21 END_OF_DATA
22 else
23   $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
24 test
25 quit
26 END_OF_DATA
27 fi
28
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