3 # Run a simple backup of the Bacula build directory using the Sparse option
6 TestName="gigaslam-sparse-test"
11 scripts/copy-test-confs
12 echo "${cwd}/build" >${cwd}/tmp/file-list
13 cd ${cwd}/build/src/tools
16 echo "Execute of ${cwd}/build/src/tools/gigaslam failed."
17 rm -f ${cwd}/build/src/tools/gigaslam.gif
24 cat >${cwd}/tmp/bconcmds <<END_OF_DATA
27 @$out ${cwd}/tmp/log1.out
28 label storage=File volume=TestVolume001
36 @$out ${cwd}/tmp/log2.out
37 restore where=${cwd}/tmp/bacula-restores select storage=File
48 check_for_zombie_jobs storage=File
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"
60 rm -f ${cwd}/build/src/tools/gigaslam.gif
61 rm -f ${cwd}/build/gigaslam.gif