]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/strip-test
updates
[bacula/bacula] / regress / tests / strip-test
1 #!/bin/sh
2 #
3 # Attempt to strip the path
4 #
5 TestName="strip-test"
6 JobName=stripTest
7 . scripts/functions
8
9 scripts/cleanup
10 scripts/copy-strip-confs
11
12
13 rm -rf /tmp/$$-strip
14 mkdir /tmp/$$-strip
15 cp -rpf ${cwd}/build/src/dird/ /tmp/$$-strip/
16 echo "/tmp/$$-strip" >${cwd}/tmp/file-list
17
18 change_jobname NightlySave $JobName
19 start_test
20
21 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
22 @$out /dev/null
23 messages
24 @$out ${cwd}/tmp/log1.out
25 @#setdebug level=150 dir
26 @#setdebug level=150 storage=FileStorage
27 setdebug level=100 client=$CLIENT
28 label storage=FileStorage pool=Default volume=TestVolume001
29 run job=$JobName storage=FileStorage pool=Default yes
30 wait
31 messages
32 quit
33 END_OF_DATA
34
35
36 run_bacula
37
38 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
39 @$out /dev/null
40 messages
41 @# 
42 @# now do a restore
43 @#
44 @$out ${cwd}/tmp/log2.out
45 @#setdebug level=50 client=$CLIENT
46 restore where=${cwd}/tmp/bacula-restores select all storage=FileStorage done
47 yes
48 wait
49 messages
50 @$out
51 quit
52 END_OF_DATA
53
54 run_bconsole
55
56 check_for_zombie_jobs storage=FileStorage
57 stop_bacula
58
59 check_two_logs
60 #
61 # Kludge remove this next line when strip is fixed
62 #
63 rm -rf tmp/bacula-restores/tmp
64 if test "$debug" -eq 1 ; then
65    diff -ur /tmp/$$-strip/dird/ tmp/bacula-restores/
66 else 
67    diff -r /tmp/$$-strip/dird/ tmp/bacula-restores/ 2>&1 >/dev/null
68 fi
69 dstat=$?
70
71 rm -rf /tmp/$$-strip
72
73 end_test