TestName="sparse-encrypt-test"
JobName=Crypto
. scripts/functions
-set_debug 0
scripts/cleanup
scripts/copy-crypto-confs
fi
cd ${cwd}
+change_jobname SparseTest $JobName
start_test
cat <<END_OF_DATA >tmp/bconcmds
check_for_zombie_jobs storage=File
stop_bacula
-size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
-if [ $size -gt 120 ]; then
- echo "========== restored sparse file: gigaslam.gif too big ========="
- echo " size is ${size}K it should be 120K"
+if [ ! -f ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif ]; then
+ echo "============= file gigaslam.gif was not restored ======="
+ size=0
+else
+ size=`du ${cwd}/tmp/bacula-restores/${cwd}/build/src/tools/gigaslam.gif | cut -f 1`
+ if [ $size -gt 120 ]; then
+ echo "========== restored sparse file: gigaslam.gif too big ========="
+ echo " size is ${size}K it should be 120K"
+ fi
fi
check_two_logs
check_restore_diff
end_test
rm -f ${cwd}/build/src/tools/gigaslam.gif
+rm -f ${cwd}/build/gigaslam.gif