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