]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/usr-tape-root
regress: tweak the message in the update_win32()
[bacula/bacula] / regress / tests / usr-tape-root
1 #!/bin/sh
2 #
3 # Run a simple backup of the /usr directory
4 #   then restore it.
5 #
6 cwd=`pwd`
7 . scripts/functions
8 scripts/copy-tape-confs
9 scripts/cleanup-tape
10 echo "/usr" >${cwd}/tmp/file-list
11
12 echo " "
13 echo " "
14 echo " === Starting usr-tape-root test ==="
15 echo " "
16 echo " "
17
18 cat <<END_OF_DATA > ${cwd}/tmp/bconcmds
19 @$out /dev/null
20 messages
21 @$out tmp/log1.out
22 label storage=tape Volume=TestVolume001 slot=0
23 run job=NightlySave yes
24 wait
25 messages
26 @# 
27 @# now do a restore
28 @#
29 @$out tmp/log2.out
30 restore where=${cwd}/tmp/bacula-restores select all done
31 yes
32 wait
33 messages
34 @output
35 quit
36 END_OF_DATA
37 run_bacula
38 stop_bacula
39 cd /
40 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
41 cd ${cwd}/tmp/bacula-restores
42 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/restored
43 cd ${cwd}/tmp
44 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1
45 sort <1 >original
46 #
47 sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1
48 sort <1 >restored
49 rm -f 1
50 #
51 cd ${cwd}
52 diff tmp/original tmp/restored 2>&1 1>/dev/nul
53 if [ $? != 0 ] ; then
54    echo " "
55    echo " "
56    echo "  ===== !!!! usr-tape-root failed !!!! ===== "
57    echo "  ===== !!!! usr-tape-root failed !!!! ===== " >>test.out
58    echo " "
59 else
60    echo "  ===== usr-tape-root OK ===== "
61    echo "  ===== usr-tape-root OK ===== " >>test.out
62    scripts/cleanup
63 fi