3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory using the Sparse option
11 TestName="gigaslam-sparse-test"
16 scripts/copy-test-confs
17 echo "${cwd}/build" >${cwd}/tmp/file-list
18 cd ${cwd}/build/src/tools
21 echo "Execute of ${cwd}/build/src/tools/gigaslam failed."
22 rm -f ${cwd}/build/src/tools/gigaslam.gif
29 cat >${cwd}/tmp/bconcmds <<END_OF_DATA
32 @$out ${cwd}/tmp/log1.out
33 label storage=File volume=TestVolume001
41 @$out ${cwd}/tmp/log2.out
42 restore where=${cwd}/tmp/bacula-restores select storage=File
53 check_for_zombie_jobs storage=File
56 size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
57 if [ $size -gt 120 ]; then
58 echo "========== restored sparse file gigaslam.gif too big ========="
59 echo " size is ${size}K it should be 120K"
65 rm -f ${cwd}/build/src/tools/gigaslam.gif
66 rm -f ${cwd}/build/gigaslam.gif