3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # This is a simple dummy test (copied from incremental-test), which
9 # simply runs some jobs then does not clean up at the end.
10 # This permits testing programs such as bconsole and bat with a little
18 ${rscripts}/copy-test-confs
19 echo "${tmpsrc}" >${tmp}/file-list
21 cp -p ${src}/src/dird/*.c ${tmpsrc}
23 echo "${tmpsrc}/ficheriro1.txt" >restore-list
24 echo "${tmpsrc}/ficheriro2.txt" >>restore-list
27 change_jobname CompressedTest $JobName
30 cat <<END_OF_DATA >${tmp}/bconcmds
34 @#setdebug level=100 storage=File
35 @#setdebug level=200 client
36 @#setdebug level=100 director
37 label storage=File volume=TestVolume001
38 label storage=File volume=TestVolume002
47 check_for_zombie_jobs storage=File
49 # Now create two new files to be restored later
52 echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
53 cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
55 cat <<END_OF_DATA >${tmp}/bconcmds
59 @# Force Incremental on the second Volume
60 update volume=TestVolume001 VolStatus=Used
61 run level=Differential job=$JobName yes
70 touch ${tmpsrc}/ficheriro1.txt
71 touch ${tmpsrc}/ficheriro2.txt
73 cat <<END_OF_DATA >${tmp}/bconcmds
77 run level=Incremental job=$JobName yes
87 cp -f ficheriro2.txt 1
88 sed "s%a%b%g" 1 >ficheriro2.txt
91 cat <<END_OF_DATA >${tmp}/bconcmds
95 run level=Differential job=$JobName yes
104 touch ${tmpsrc}/ficheriro1.txt
105 touch ${tmpsrc}/ficheriro2.txt
106 cat <<END_OF_DATA >${tmp}/bconcmds
109 @$out ${tmp}/log1.out
110 run level=Incremental job=$JobName yes
119 touch ${tmpsrc}/ficheriro1.txt
120 touch ${tmpsrc}/ficheriro2.txt
121 cat <<END_OF_DATA >${tmp}/bconcmds
124 @$out ${tmp}/log1.out
125 run level=Incremental job=$JobName yes
134 touch ${tmpsrc}/ficheriro1.txt
135 touch ${tmpsrc}/ficheriro2.txt
136 cat <<END_OF_DATA >${tmp}/bconcmds
139 @$out ${tmp}/log1.out
140 run level=Incremental job=$JobName yes
148 touch ${tmpsrc}/ficheriro1.txt
149 touch ${tmpsrc}/ficheriro2.txt
151 cat <<END_OF_DATA >${tmp}/bconcmds
154 @$out ${tmp}/log1.out
155 setdebug level=200 storage=File
156 run level=Incremental job=$JobName yes
162 @$out ${tmp}/log2.out
163 setdebug level=10 storage=File
164 restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
174 check_for_zombie_jobs storage=File
177 # Stop early to leave everything defined, Bacula running, ...
182 # The rest of this is not executed
187 # Delete .c files because we will only restored the txt files
190 check_restore_tmp_build_diff