]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/gigaslam-sparse-test
Tweak correct English in debug output of regress tests
[bacula/bacula] / regress / tests / gigaslam-sparse-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the Sparse option
4 #   then restore it.
5 #
6 TestName="gigaslam-sparse-test"
7 JobName=SparseTest
8 . scripts/functions
9
10 scripts/cleanup
11 scripts/copy-test-confs
12 echo "${cwd}/build" >${cwd}/tmp/file-list
13 cd ${cwd}/build/src/tools
14 ./gigaslam
15 if [ $? != 0 ]; then
16    echo "Execute of ${cwd}/build/src/tools/gigaslam failed."
17    rm -f ${cwd}/build/src/tools/gigaslam.gif
18    exit 1
19 fi
20 cd ${cwd}
21
22 start_test
23
24 cat >${cwd}/tmp/bconcmds <<END_OF_DATA
25 @$out /dev/null
26 messages
27 @$out ${cwd}/tmp/log1.out
28 label storage=File volume=TestVolume001
29 run job=$JobName yes
30 wait
31 messages
32 list volumes
33 @# 
34 @# now do a restore
35 @#
36 @$out ${cwd}/tmp/log2.out
37 restore where=${cwd}/tmp/bacula-restores select storage=File
38 unmark *
39 mark *
40 done
41 yes
42 wait
43 messages
44 quit
45 END_OF_DATA
46
47 run_bacula
48 check_for_zombie_jobs storage=File 
49 stop_bacula
50
51 size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
52 if [ $size -gt 120 ]; then
53    echo "========== restored sparse file gigaslam.gif too big ========="
54    echo "      size is ${size}K it should be 120K"
55 fi
56
57 check_two_logs
58 check_restore_diff
59 end_test
60 rm -f ${cwd}/build/src/tools/gigaslam.gif
61 rm -f ${cwd}/build/gigaslam.gif