]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/stats-test
regress: change /bin/sleep to sleep
[bacula/bacula] / regress / tests / stats-test
index 73c2167b13b100101be6f9ae088f564f86406cd6..a7e97cf264afbf1726515445fb0999f875b141a3 100755 (executable)
@@ -19,20 +19,20 @@ echo "s% DIRport%Statistics Retention = 1 sec; DIRport%g" >> $outf
 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
 
-change_jobname Client1 $JobName
+change_jobname BackupClient1 $JobName
 start_test
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@output /dev/null
+@$out /dev/null
 messages
 @$out ${cwd}/tmp/log1.out
-label volume=TestVolume001 storage=File pool=Default
+label volume=TestVolume001 storage=File pool=File
 run job=$JobName yes
 wait
 messages
 update stats days=1
 sql
-SELECT 'FOUND' AS test FROM JobHistory;
+SELECT 'FOUND' AS test FROM JobHisto;
 
 run job=$JobName yes
 wait
@@ -41,40 +41,42 @@ messages
 @$out ${cwd}/tmp/log2.out
 update stats
 sql
-SELECT 'FOUND' AS test FROM JobHistory;
+SELECT 'FOUND' AS test FROM JobHisto;
 
 list jobs
 prune stats yes
 @$out ${cwd}/tmp/log3.out
 sql
-SELECT 'FOUND' AS test FROM JobHistory;
+SELECT 'FOUND' AS test FROM JobHisto;
 
 quit
 END_OF_DATA
 
 run_bacula
-export dstat=0
-export rstat=0
-export bstat=0
+
+dstat=0
+rstat=0
+bstat=0
+
 check_for_zombie_jobs storage=File
 stop_bacula
 
 
-COUNT=$(grep FOUND ${cwd}/tmp/log1.out | wc -l)
+COUNT=`grep FOUND ${cwd}/tmp/log1.out | wc -l`
 if [ $COUNT -ne 1 ]; then
-    print_debug "Bad count in jobstat table"
+    print_debug "Bad count in JobHisto table"
     bstat=1
 fi
 
-COUNT=$(grep FOUND ${cwd}/tmp/log2.out | wc -l)
+COUNT=`grep FOUND ${cwd}/tmp/log2.out | wc -l`
 if [ $COUNT -ne 3 ]; then
-    print_debug "Bad count in jobstat table"
+    print_debug "Bad count in JobHisto table"
     bstat=2
 fi
 
-COUNT=$(grep FOUND ${cwd}/tmp/log3.out | wc -l)
+COUNT=`grep FOUND ${cwd}/tmp/log3.out | wc -l`
 if [ $COUNT -ne 1 ]; then
-    print_debug "Bad count in jobstat table"
+    print_debug "Bad count in JobHisto table"
     bstat=3
 fi