]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/bls-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / bls-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 # Run a simple backup of the Bacula build directory then bls
7 #   the resulting Volume
8 #
9 TestName="bls-test"
10 JobName=Simple
11 . scripts/functions
12
13 ${rscripts}/cleanup
14 ${rscripts}/copy-test-confs
15 echo "${tmpsrc}" >${tmp}/file-list
16 mkdir -p ${tmpsrc}
17 cp -p ${src}/src/dird/*.c ${tmpsrc}
18 cd ${tmp}
19 echo "${tmpsrc}/ficheriro1.txt" >restore-list
20 echo "${tmpsrc}/ficheriro2.txt" >>restore-list
21 cd ${cwd}
22
23 start_test
24
25 cat <<END_OF_DATA >${tmp}/bconcmds
26 @$out /dev/null
27 messages
28 @$out ${tmp}/log1.out
29 @#setdebug level=200 storage=File
30 @#setdebug level=200 client
31 @#setdebug level=100 director
32 label storage=File volume=TestVolume001
33 label storage=File volume=TestVolume002
34 run job=$JobName yes
35 status client
36 wait
37 messages
38 quit
39 END_OF_DATA
40
41 run_bacula
42 check_for_zombie_jobs storage=File
43 stop_bacula
44
45 $bin/bls -d 50 -v -c $conf/bacula-sd.conf -V 'TestVolume001' FileStorage > $tmp/bls.out
46 if [ $? != 0 ] ; then
47    zstat=2
48 fi
49 if test "$debug" -eq 1 ; then
50    cat $tmp/bls.out
51 fi
52
53 #check_restore_tmp_build_diff
54 #end_test