]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/testing/regress-opt-bacula.patch
Fix link rules
[bacula/bacula] / bacula / patches / testing / regress-opt-bacula.patch
1 Index: scripts/cleanup-tape.in
2 ===================================================================
3 --- scripts/cleanup-tape.in     (révision 7994)
4 +++ scripts/cleanup-tape.in     (copie de travail)
5 @@ -12,16 +12,16 @@
6  init_slot @tape_drive@ $SLOT1
7  
8  if test x@autochanger@ != x/dev/null; then
9 -   slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
10 +   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
11     case $slot in
12     0)
13 -      bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
14 +      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
15        ;;
16     $SLOT1)
17        ;;
18     *)
19 -      bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
20 -      bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
21 +      $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
22 +      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
23        ;;
24    esac
25  fi
26 Index: scripts/prepare-two-tapes.in
27 ===================================================================
28 --- scripts/prepare-two-tapes.in        (révision 7994)
29 +++ scripts/prepare-two-tapes.in        (copie de travail)
30 @@ -18,10 +18,10 @@
31  # optimize so we don't unnecessarily unload and load slots
32  #
33  if test x@autochanger@ != x/dev/null; then
34 -   slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
35 +   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
36     case $slot in
37     0)
38 -      bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
39 +      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
40        slot=$SLOT1
41        ;;
42     $SLOT1)
43 @@ -31,22 +31,22 @@
44        slot=$SLOT2
45        ;;
46     *)
47 -      bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
48 -      bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
49 +      $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
50 +      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
51        slot=$SLOT1
52        ;;
53    esac
54    init_drive @tape_drive@
55 -  bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
56 +  $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
57  
58  
59  # init the other slot
60    case $slot in
61     $SLOT1)
62 -      bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
63 +      $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
64        ;;
65     $SLOT2)
66 -      bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
67 +      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
68        ;;
69     *)
70        echo "Something went wrong. Expected $SLOT1 or $SLOT2, got $slot"
71 Index: scripts/check_for_zombie_jobs
72 ===================================================================
73 --- scripts/check_for_zombie_jobs       (révision 7994)
74 +++ scripts/check_for_zombie_jobs       (copie de travail)
75 @@ -14,7 +14,7 @@
76      client=${HOST}-fd
77  fi
78  
79 -bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
80 +$bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
81  @output tmp/dir.out
82  status dir
83  @output tmp/fd.out
84 Index: scripts/prepare-other-loc
85 ===================================================================
86 --- scripts/prepare-other-loc   (révision 8011)
87 +++ scripts/prepare-other-loc   (copie de travail)
88 @@ -5,8 +5,8 @@
89  SCR=$cwd/bin/bacula-ctl
90  sed "s:BACDIRBIN=$cwd/bin:BACDIRBIN=$bin:" $SCR-dir > tmp/1
91  mv tmp/1 $SCR-dir
92 -se   d -i "s:BACSDBIN=$cwd/bin:BACSDBIN=$bin:" $SCR-sd > tmp/1
93 -mv tm  p/1 $SCR-sd
94 +sed -i "s:BACSDBIN=$cwd/bin:BACSDBIN=$bin:" $SCR-sd > tmp/1
95 +mv tmp/1 $SCR-sd
96  sed -i "s:BACFDBIN=$cwd/bin:BACFDBIN=$bin:" $SCR-fd > tmp/1
97  mv tmp/1 $SCR-fd
98  chmod -x $cwd/bin/bacula-{fd,sd,dir} $cwd/bin/bconsole    
99 Index: scripts/setup
100 ===================================================================
101 --- scripts/setup       (révision 7994)
102 +++ scripts/setup       (copie de travail)
103 @@ -20,6 +20,7 @@
104     exit 1
105  fi
106  
107 +# we build and setup binaries to the $cwd/bin directory not $bin
108  rm -rf build bin
109  # Copy new source
110  echo "Copying source from ${BACULA_SOURCE}"
111 Index: scripts/cleanup-2drive.in
112 ===================================================================
113 --- scripts/cleanup-2drive.in   (révision 7994)
114 +++ scripts/cleanup-2drive.in   (copie de travail)
115 @@ -6,40 +6,40 @@
116  scripts/cleanup
117  
118  if test x@autochanger@ != x/dev/null; then
119 -   slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
120 +   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
121     echo "Slot $slot in drive 1"
122     if test x$slot != x0 ; then
123        echo "unload slot $slot in drive 1"
124 -      bin/@changer_script@ @autochanger@ unload $slot @tape_drive1@ 1
125 +      $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive1@ 1
126     fi
127 -   slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
128 +   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
129     echo "Slot $slot in drive 0"
130     if test x$slot != x0 ; then
131        echo "unload slot $slot in drive 0"
132 -      bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ 0
133 +      $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ 0
134     fi
135  
136  
137 -   slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
138 +   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
139     if test x$slot != x$SLOT2; then
140        echo "load slot $SLOT2 in drive 1"
141 -      bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1
142 +      $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1
143     fi
144     echo "WEOF drive 1"
145     init_drive @tape_drive1@
146  
147     echo "unload slot $SLOT2 in drive 1"
148 -   bin/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1
149 +   $scripts/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1
150  
151 -   slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
152 +   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
153     echo "Slot $slot in drive 0"
154     if test x$slot != x$SLOT1; then
155        echo "load slot $SLOT1 in drive 0"
156 -      bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0
157 +      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0
158     fi
159     echo "WEOF drive 0"
160     init_drive @tape_drive@
161  
162     echo "unload slot $SLOT1 from drive 0"
163 -   bin/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0
164 +   $scripts/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0
165  fi
166 Index: scripts/functions
167 ===================================================================
168 --- scripts/functions   (révision 7994)
169 +++ scripts/functions   (copie de travail)
170 @@ -10,11 +10,11 @@
171     echo "s%  mail =%# mail = %g" >${outf}
172     echo "s%  operator =%# operator =%g" >>${outf}
173     cp bin/bacula-dir.conf tmp/1
174 -   sed -f ${outf} tmp/1 >bin/bacula-dir.conf
175 +   sed -f ${outf} tmp/1 > bin/bacula-dir.conf
176     echo " "
177     echo " "
178     echo " === Starting $TestName at `date +%R:%S` ==="
179 -   echo " === Starting $TestName at `date +%R:%S` ===" >>working/log
180 +   echo " === Starting $TestName at `date +%R:%S` ===" >> working/log
181     echo " "
182     export zstat
183  }
184 @@ -147,11 +147,11 @@
185       bin/bacula-ctl-sd start
186       bin/bacula-ctl-fd start $1
187       bin/bacula-ctl-dir start
188 -     cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
189 +     cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf
190       return $?
191     else
192 -     bin/bacula start 2>&1 >/dev/null
193 -     cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
194 +     bin/bacula start >/dev/null 2>&1
195 +     cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf >/dev/null 2>&1
196       return $?
197     fi
198  }
199 @@ -159,27 +159,27 @@
200  run_bconsole()
201  {
202     if test "$debug" -eq 1 ; then
203 -     cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
204 +     cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf
205     else
206 -     cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
207 +     cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
208     fi
209  }
210  
211  run_btape()
212  {
213     if test "$debug" -eq 1 ; then
214 -     cat tmp/bconcmds | bin/btape -c bin/bacula-sd.conf DDS-4 | tee tmp/log1.out
215 +     cat tmp/bconcmds | $bin/btape -c bin/bacula-sd.conf DDS-4 | tee tmp/log1.out
216     else
217 -     cat tmp/bconcmds | bin/btape -c bin/bacula-sd.conf DDS-4 2>&1 >tmp/log1.out
218 +     cat tmp/bconcmds | $bin/btape -c bin/bacula-sd.conf DDS-4 >tmp/log1.out 2>&1
219     fi
220  }
221  
222  run_bscan()
223  {
224     if test "$debug" -eq 1 ; then
225 -      bin/bscan $* | tee tmp/log.out
226 +      $bin/bscan $* | tee tmp/log.out
227     else
228 -      bin/bscan $* 2>&1 >/dev/null
229 +      $bin/bscan $* 2>&1 >/dev/null
230     fi
231  }
232  
233 @@ -356,10 +356,10 @@
234  load_slot1() 
235  {
236  # Get a tape from slot1
237 -slot=`bin/$MTX ${AUTOCHANGER} loaded 0 ${TAPE_DRIVE} $DRIVE1`
238 +slot=`$scripts/$MTX ${AUTOCHANGER} loaded 0 ${TAPE_DRIVE} $DRIVE1`
239  case $slot in
240   0)
241 -    bin/$MTX ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
242 +    $scripts/$MTX ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
243      slot=$SLOT1
244      ;;
245   $SLOT1)
246 @@ -367,8 +367,8 @@
247      ;;
248   *)
249      rewind_drive ${TAPE_DRIVE}
250 -    bin/$MTX ${AUTOCHANGER} unload $slot  ${TAPE_DRIVE} $DRIVE1
251 -    bin/$MTX ${AUTOCHANGER} load   $SLOT1 ${TAPE_DRIVE} $DRIVE1
252 +    $scripts/$MTX ${AUTOCHANGER} unload $slot  ${TAPE_DRIVE} $DRIVE1
253 +    $scripts/$MTX ${AUTOCHANGER} load   $SLOT1 ${TAPE_DRIVE} $DRIVE1
254      slot=$SLOT1
255      ;;
256  esac
257 @@ -383,17 +383,17 @@
258  rewind_drive ${TAPE_DRIVE}
259  case $1 in
260   0)
261 -    bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
262 +    $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
263      slot=1
264      ;;
265   $SLOT1)
266 -    bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
267 -    bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT2 ${TAPE_DRIVE} $DRIVE1
268 +    $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
269 +    $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT2 ${TAPE_DRIVE} $DRIVE1
270      slot=2
271      ;;
272   $SLOT2)
273 -    bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
274 -    bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
275 +    $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
276 +    $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
277      slot=1
278      ;;
279   *)
280 @@ -403,7 +403,6 @@
281  esac
282  }
283  
284 -
285  # Save current directory
286  cwd=`pwd`
287  if test "x${REGRESS_DEBUG}" = "x1"; then
288 @@ -418,16 +417,23 @@
289  db_name=${db_name:-"regress"}
290  db_user=${db_user:-"regress"}
291  db_password=${db_password:-""}
292 +working=${working:-"$cwd/working"}
293 +bin=${bin:-"$cwd/bin"}
294 +scripts=${scripts:-"$bin"}
295  
296 +export bin
297 +export working
298 +export scripts
299 +
300  CLIENT=${HOST}-fd
301  
302  if [ x$USE_VTAPE = xyes ]; then
303 -   mkdir -p $cwd/working/ach
304 +   mkdir -p $working/ach
305     SLOT1=1
306     SLOT2=2
307 -   TAPE_DRIVE=$cwd/working/ach/drive1
308 -   TAPE_DRIVE1=$cwd/working/ach/drive1
309 -   AUTOCHANGER=$cwd/working/ach/config
310 +   TAPE_DRIVE=$working/ach/drive1
311 +   TAPE_DRIVE1=$working/ach/drive1
312 +   AUTOCHANGER=$working/ach/config
313     AUTOCHANGER_SCRIPT=disk-changer
314     DRIVE1=0
315     DRIVE2=1
316 @@ -438,6 +444,6 @@
317  fi
318  
319  AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer}
320 -LD_LIBRARY_PATH=$cwd/bin
321 +LD_LIBRARY_PATH=$bin
322  export LD_LIBRARY_PATH
323  
324 Index: tests/btape-fill-full-tape
325 ===================================================================
326 --- tests/btape-fill-full-tape  (révision 7994)
327 +++ tests/btape-fill-full-tape  (copie de travail)
328 @@ -14,7 +14,7 @@
329  change_jobname $JobName
330  start_test
331  
332 -bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA 2>&1 >${cwd}/tmp/log1.out
333 +$bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
334  fill
335  s
336  
337 @@ -22,7 +22,7 @@
338  END_OF_DATA
339  
340  
341 -grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out 2>&1 >/dev/null
342 +grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out >/dev/null 2>&1
343  if [ $? != 0 ] ; then
344     echo " "
345     echo " "
346 Index: tests/disk-changer-test
347 ===================================================================
348 --- tests/disk-changer-test     (révision 7994)
349 +++ tests/disk-changer-test     (copie de travail)
350 @@ -3,43 +3,43 @@
351  mkdir tmp/disk-changer
352  touch tmp/disk-changer/conf 
353  echo "Unload drive 0"
354 -bin/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
355 +$scripts/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
356  echo "rtn=$?"   
357  echo "Test what is in drive 0"
358 -bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
359 +$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
360  echo "rtn=$?"   
361  echo "Load Slot 1 into drive 0"
362 -bin/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
363 +$scripts/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
364  echo "rtn=$?"   
365  echo "Test what is in drive 0"
366 -bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
367 +$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
368  echo "rtn=$?"   
369  
370  echo "Unload drive 1"
371 -bin/disk-changer tmp/disk-changer/conf unload 2 tmp/disk-changer/drive1 1
372 +$scripts/disk-changer tmp/disk-changer/conf unload 2 tmp/disk-changer/drive1 1
373  echo "rtn=$?"   
374  echo "Test what is in drive 1"
375 -bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
376 +$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
377  echo "rtn=$?"   
378  echo "Load Slot 2 drive 1"
379 -bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
380 +$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
381  echo "rtn=$?"   
382  echo "Test what is in drive 1"
383 -bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
384 +$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
385  echo "rtn=$?"   
386  
387  echo "Load Slot 1 into drive 0 -- error"
388 -bin/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
389 +$scripts/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
390  echo "rtn=$?"   
391  echo "Load Slot 2 into drive 1 -- error"
392 -bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
393 +$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
394  echo "rtn=$?"   
395  echo "Load Slot 2 in drive 0 -- error"
396 -bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
397 +$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
398  echo "rtn=$?"   
399  echo "Unload drive 0"
400 -bin/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
401 +$scripts/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
402  echo "rtn=$?"   
403  echo "Load Slot 2 in drive 0 -- should fail"
404 -bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
405 +$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
406  echo "rtn=$?"   
407 Index: tests/bug-fatal-test
408 ===================================================================
409 --- tests/bug-fatal-test        (révision 7994)
410 +++ tests/bug-fatal-test        (copie de travail)
411 @@ -34,12 +34,11 @@
412  END_OF_DATA
413  
414  
415 -bin/bacula start
416 -cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
417 +run_bacula
418  stop_bacula
419  
420 -export dstat=0
421 -export bstat=0
422 -export rstat=0
423 +dstat=0
424 +bstat=0
425 +rstat=0
426  
427  end_test
428 Index: tests/errors-test
429 ===================================================================
430 --- tests/errors-test   (révision 7994)
431 +++ tests/errors-test   (copie de travail)
432 @@ -64,7 +64,7 @@
433  
434  run_bacula
435  touch ${cwd}/tmp/log1.out
436 -client=$(grep client= bin/bacula-dir.conf)
437 +client=`grep client= $bin/bacula-dir.conf`
438  check_for_zombie_jobs storage=File $client
439  stop_bacula
440  
441 Index: tests/restore-by-file-tape
442 ===================================================================
443 --- tests/restore-by-file-tape  (révision 7994)
444 +++ tests/restore-by-file-tape  (copie de travail)
445 @@ -93,7 +93,7 @@
446  check_two_logs
447  
448  scripts/check_for_zombie_jobs storage=DDS-4
449 -bin/bacula stop 2>&1 >/dev/null
450 +stop_bacula
451  for i in `cat ${cwd}/tmp/restore2-list`; do
452     diff $i ${cwd}/tmp/bacula-restores$i
453     if [ $? != 0 ] ; then
454 Index: tests/vtape-test-changer
455 ===================================================================
456 --- tests/vtape-test-changer    (révision 7994)
457 +++ tests/vtape-test-changer    (copie de travail)
458 @@ -30,7 +30,7 @@
459  when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"`
460  when2=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+45))"`
461  
462 -clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf`
463 +clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' $bin/bacula-dir.conf`
464  
465  # Catalog record for cleaning tape "CLN01" successfully created.
466  # CLN01      | Cleaning
467 Index: tests/usr-tape-root
468 ===================================================================
469 --- tests/usr-tape-root (révision 7994)
470 +++ tests/usr-tape-root (copie de travail)
471 @@ -15,8 +15,7 @@
472  echo " "
473  echo " "
474  
475 -bin/bacula start 2>&1 >/dev/null
476 -bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
477 +cat <<END_OF_DATA > ${cwd}/tmp/bconcmds
478  @output /dev/null
479  messages
480  @output tmp/log1.out
481 @@ -35,7 +34,8 @@
482  @output
483  quit
484  END_OF_DATA
485 -bin/bacula stop 2>&1 >/dev/null
486 +run_bacula
487 +stop_bacula
488  cd /
489  ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
490  cd ${cwd}/tmp/bacula-restores
491 Index: tests/concurrent-jobs-test
492 ===================================================================
493 --- tests/concurrent-jobs-test  (révision 7994)
494 +++ tests/concurrent-jobs-test  (copie de travail)
495 @@ -16,7 +16,7 @@
496     dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
497  else
498     echo "Creating a 56MB file with bacula-dir data ..."
499 -   dd if=bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000
500 +   dd if=$bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000
501     cat ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 >${cwd}/tmp/2
502     rm -f ${cwd}/tmp/1
503     cat ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 >>${cwd}/tmp/3
504 Index: tests/accurate-test
505 ===================================================================
506 --- tests/accurate-test (révision 7994)
507 +++ tests/accurate-test (copie de travail)
508 @@ -157,7 +157,7 @@
509  # Check with bls
510  ################################################################
511  
512 -${cwd}/bin/bls -c ${cwd}/bin/bacula-sd.conf -V 'TestVolume001' FileStorage > tmp/bls.out
513 +$bin/bls -c bin/bacula-sd.conf -V 'TestVolume001' FileStorage > tmp/bls.out
514  grep -- '----' tmp/bls.out | grep xxx > /dev/null
515  if [ $? != 0 ] ; then
516      bstat=2
517 @@ -283,7 +283,7 @@
518  
519  bscan_libdbi
520  
521 -${cwd}/bin/bscan -c ${cwd}/bin/bacula-sd.conf $BSCANLIBDBI -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log
522 +$bin/bscan -c bin/bacula-sd.conf $BSCANLIBDBI -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log
523  
524  cat <<END_OF_DATA >${cwd}/tmp/bconcmds
525  @$out ${cwd}/tmp/log1.out
526 Index: tests/incremental-2disk
527 ===================================================================
528 --- tests/incremental-2disk     (révision 7994)
529 +++ tests/incremental-2disk     (copie de travail)
530 @@ -9,14 +9,7 @@
531  JobName=Inc2disk
532  . scripts/functions
533  
534 -
535 -stop_bacula
536 -cd bin
537 -./drop_bacula_tables >/dev/null 2>&1
538 -./make_bacula_tables >/dev/null 2>&1
539 -./grant_bacula_privileges 2>&1 >/dev/null
540 -cd ..
541 -
542 +scripts/cleanup
543  scripts/copy-2disk-confs
544  scripts/prepare-disk-changer
545  
546 Index: tests/lib-tape-root
547 ===================================================================
548 --- tests/lib-tape-root (révision 7994)
549 +++ tests/lib-tape-root (copie de travail)
550 @@ -5,13 +5,7 @@
551  #
552  cwd=`pwd`
553  . scripts/functions
554 -bin/bacula stop 2>&1 >/dev/null
555 -cd bin
556 -./drop_bacula_tables >/dev/null 2>&1
557 -./make_bacula_tables >/dev/null 2>&1
558 -./grant_bacula_privileges 2>&1 >/dev/null
559 -cd ..
560 -
561 +scripts/cleanup
562  scripts/cleanup-tape
563  scripts/copy-tape-confs
564  echo "/lib" >${cwd}/tmp/file-list
565 @@ -20,8 +14,8 @@
566  echo " === Starting lib-tape-root test ==="
567  echo " "
568  echo " "
569 -bin/bacula start 2>&1 >/dev/null
570 -bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
571 +
572 +cat <<END_OF_DATA > >${cwd}/tmp/bconcmds
573  @output /dev/null
574  messages
575  @output ${cwd}/tmp/log1.out
576 @@ -40,7 +34,10 @@
577  @output
578  quit
579  END_OF_DATA
580 -bin/bacula stop 2>&1 >/dev/null
581 +
582 +run_bacula
583 +stop_bacula
584 +
585  cd /
586  ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
587  cd ${cwd}/tmp/bacula-restores
588 Index: tests/two-volume-changer
589 ===================================================================
590 --- tests/two-volume-changer    (révision 7994)
591 +++ tests/two-volume-changer    (copie de travail)
592 @@ -54,7 +54,7 @@
593  check_for_zombie_jobs storage=DDS-4
594  stop_bacula
595  
596 -bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
597 +$scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
598  
599  cat <<END_OF_DATA >tmp/bconcmds
600  @$out /dev/null
601 Index: tests/bextract-test
602 ===================================================================
603 --- tests/bextract-test (révision 7994)
604 +++ tests/bextract-test (copie de travail)
605 @@ -45,9 +45,9 @@
606  
607  mkdir -p ${cwd}/tmp/bacula-restores
608  if test "$debug" -eq 1 ; then
609 -  bin/bextract -v -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores                
610 +  $bin/bextract -v -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores                
611  else
612 -  bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
613 +  $bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
614  fi
615  rstat=$?
616  grep "^  Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
617 Index: tests/four-jobs-tape
618 ===================================================================
619 --- tests/four-jobs-tape        (révision 7994)
620 +++ tests/four-jobs-tape        (copie de travail)
621 @@ -30,13 +30,7 @@
622  messages
623  quit
624  END_OF_DATA
625 -if test "$debug" -eq 1 ; then
626 -  bin/bacula start
627 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
628 -else
629 -  bin/bacula start 2>&1 >/dev/null
630 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
631 -fi
632 +run_bacula
633  
634  scripts/check_for_zombie_jobs storage=DDS-4
635  echo "Backup 1 done"
636 @@ -56,14 +50,9 @@
637  messages
638  quit
639  END_OF_DATA
640 -if test "$debug" -eq 1 ; then
641 -  bin/bacula start
642 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
643 -else
644 -  bin/bacula start 2>&1 >/dev/null
645 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
646 -fi
647  
648 +run_bacula
649 +
650  scripts/check_for_zombie_jobs storage=DDS-4
651  echo "Backup 2 done"
652  touch ${cwd}/build/src/dird/*.c
653 @@ -80,14 +69,9 @@
654  messages
655  quit
656  END_OF_DATA
657 -if test "$debug" -eq 1 ; then
658 -  bin/bacula start
659 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
660 -else
661 -  bin/bacula start 2>&1 >/dev/null
662 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
663 -fi
664  
665 +run_bacula
666 +
667  scripts/check_for_zombie_jobs storage=DDS-4
668  echo "Backup 3 done"
669  # make some files for the incremental to pick up
670 @@ -104,13 +88,7 @@
671  messages
672  quit
673  END_OF_DATA
674 -if test "$debug" -eq 1 ; then
675 -  bin/bacula start
676 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
677 -else
678 -  bin/bacula start 2>&1 >/dev/null
679 -  cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
680 -fi
681 +run_bacula
682  
683  scripts/check_for_zombie_jobs storage=DDS-4
684  echo "Backup 4 done"
685 Index: tests/bscan-test
686 ===================================================================
687 --- tests/bscan-test    (révision 7994)
688 +++ tests/bscan-test    (copie de travail)
689 @@ -67,9 +67,9 @@
690  fi
691  
692  if test "$debug" -eq 1 ; then
693 -  bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp                   
694 +  $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp                   
695  else
696 -  bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >tmp/log3.out
697 +  $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp >tmp/log3.out 2>&1
698  fi
699  
700  cat <<END_OF_DATA >tmp/bconcmds
701 Index: tests/bscan-fast-tape
702 ===================================================================
703 --- tests/bscan-fast-tape       (révision 7994)
704 +++ tests/bscan-fast-tape       (copie de travail)
705 @@ -34,7 +34,7 @@
706  END_OF_DATA
707  
708  echo "Starting Bacula tape writing"
709 -#bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
710 +#$bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
711  #rewind
712  #label
713  #Test001
714 @@ -66,7 +66,7 @@
715  
716  bscan_libdbi
717  
718 -strace -o strace.new bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
719 +strace -o strace.new $bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
720  exit
721  cat <<END_OF_DATA >tmp/bconcmds
722  @$out /dev/null
723 Index: tests/bscan-tape
724 ===================================================================
725 --- tests/bscan-tape    (révision 7994)
726 +++ tests/bscan-tape    (copie de travail)
727 @@ -106,9 +106,9 @@
728  fi
729  
730  if test "$debug" -eq 1 ; then
731 -  bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4                
732 +  $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4                
733  else
734 -  bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null
735 +  $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 >/dev/null 2>&1
736  fi
737  
738  echo $BSCANLIBDBI