change_jobname BackupClient1 $JobName
p() {
- echo "##############################################" >> ${cwd}/tmp/log1.out
- echo "$*" >> ${cwd}/tmp/log1.out
- echo "##############################################" >> ${cwd}/tmp/log2.out
- echo "$*" >> ${cwd}/tmp/log2.out
+ echo "##############################################" >> ${cwd}/tmp/log1.out
+ echo "$*" >> ${cwd}/tmp/log1.out
+ echo "##############################################" >> ${cwd}/tmp/log2.out
+ echo "$*" >> ${cwd}/tmp/log2.out
+ if test "$debug" -eq 1 ; then
+ echo "##############################################"
+ echo "$*"
+ fi
}
# cleanup
# add extra files
-mkdir ${cwd}/build/accurate
-mkdir ${cwd}/build/accurate/dirtest
+mkdir -p ${cwd}/build/accurate
+mkdir -p ${cwd}/build/accurate/dirtest
echo "test test" > ${cwd}/build/accurate/dirtest/hello
echo "test test" > ${cwd}/build/accurate/xxx
echo "test test" > ${cwd}/build/accurate/yyy
$bin/bls -c $conf/bacula-sd.conf -V 'TestVolume001' FileStorage > $tmp/bls.out
grep -- '----' $tmp/bls.out | grep xxx > /dev/null
if [ $? != 0 ] ; then
+ print_debug "ERROR: Should find deleted files into $tmp/bls.out"
bstat=2
fi
bscan_libdbi
-$bin/bscan -c $conf/bacula-sd.conf $BSCANLIBDBI -n regress -u regress -m -s -b $tmp/bscan.bsr FileStorage 2>&1 > $tmp/bscan.log
+$bin/bscan -c $conf/bacula-sd.conf $BSCANLIBDBI -n "$db_name" -u "$db_user" -m -s -b $tmp/bscan.bsr FileStorage 2>&1 > $tmp/bscan.log
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out ${cwd}/tmp/log1.out
grep yyy ${cwd}/tmp/log3.out > /dev/null
if [ $? != 0 ] ; then
- print_debug "Can't find yyy file into 'list files' output (${cwd}/tmp/log3.out)"
+ print_debug "ERROR: Can't find yyy file into 'list files' output (${cwd}/tmp/log3.out)"
dstat=2
fi
-if grep zzz ${cwd}/tmp/log3.out > /dev/null
-then
- print_debug "Can't find zzz file into 'list files' output (${cwd}/tmp/log3.out)"
+grep zzz ${cwd}/tmp/log3.out > /dev/null
+if [ $? = 0 ] ; then
+ print_debug "ERROR: Should not find zzz file into 'list files' output (${cwd}/tmp/log3.out)"
dstat=2
fi