]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl add accurate=yes/no test for estimate
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 2 Jul 2009 12:44:35 +0000 (12:44 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 2 Jul 2009 12:44:35 +0000 (12:44 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8951 91ce42f0-d328-0410-95d8-f526ca767f89

regress/tests/estimate-test

index 212a5d4f862f6c032e472d857438a76ed45e9395..5d49be7c66aec8b8d3e04a8ce7144b573d9c39b1 100755 (executable)
@@ -62,13 +62,24 @@ END_OF_DATA
 
 run_bconsole
 
+cat <<END_OF_DATA >$tmp/bconcmds
+@output /dev/null
+messages
+@$out $tmp/log4.out
+estimate listing job=$JobName level=incremental accurate=yes
+messages
+quit
+END_OF_DATA
+
+run_bconsole
+
 cp $scripts/bacula-dir.conf $tmp/1
 sed 's/JobDefs {/JobDefs { Accurate=yes/' $tmp/1>$scripts/bacula-dir.conf
 
 cat <<END_OF_DATA >$tmp/bconcmds
 @output /dev/null
 messages
-@$out $tmp/log4.out
+@$out $tmp/log5.out
 reload
 estimate listing job=$JobName level=incremental
 messages
@@ -77,6 +88,17 @@ END_OF_DATA
 
 run_bconsole
 
+cat <<END_OF_DATA >$tmp/bconcmds
+@output /dev/null
+messages
+@$out $tmp/log6.out
+estimate listing job=$JobName level=incremental accurate=no
+messages
+quit
+END_OF_DATA
+
+run_bconsole
+
 rm -rf ${cwd}/build/po/test
 
 grep test1 $tmp/log3.out > /dev/null
@@ -87,7 +109,19 @@ fi
 
 grep test1 $tmp/log4.out > /dev/null
 if [ $? != 0 ]; then
-    print_debug "Accurate estimate should detect test1 file in $tmp/log4.out"
+    print_debug "Accurate=yes estimate should detect test1 file in $tmp/log4.out"
+    dstat=2
+fi
+
+grep test1 $tmp/log5.out > /dev/null
+if [ $? != 0 ]; then
+    print_debug "Accurate estimate should detect test1 file in $tmp/log5.out"
+    dstat=2
+fi
+
+grep test1 $tmp/log6.out > /dev/null
+if [ $? = 0 ]; then
+    print_debug "Accurate=no estimate shouldn't detect test1 file in $tmp/log6.out"
     dstat=2
 fi