]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/prune-migration-test
regress: tweak prune-xxx script to display accurate results
[bacula/bacula] / regress / tests / prune-migration-test
index 7b200874f9c2f1aec7d188e15566f2fb5f6a82fd..95a2d4a96a2943977262ff661bec1f0b86cca182 100755 (executable)
@@ -39,20 +39,15 @@ label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
 @# run two jobs (both will be migrated)
 run job=$JobName yes
+@sleep 2
 run job=$JobName yes
 wait
 list jobs
-list volumes
-@#setdebug level=100 dir
 @# should migrate two jobs
-@#setdebug level=51 storage=DiskChanger
 run job=migrate-job yes
 wait
 messages
-@# purge volume=FileVolume001
 list jobs 
-list volumes
-list joblog jobid=6
 wait
 @#
 @# Now do another backup, but level Incremental
@@ -60,12 +55,10 @@ wait
 run job=$JobName level=Incremental yes
 wait
 messages
-@sleep 1
+@sleep 2
 @################################################################
-@$out $cwd/tmp/log3.out
-@#
-@# This final job that runs should be Incremental and
-@# not upgraded to full.
+@$out $cwd/tmp/log10.out
+setdebug level=1 director
 list jobs
 prune jobs yes
 list jobs
@@ -92,7 +85,14 @@ stop_bacula
 check_two_logs
 check_restore_diff
 
-$bperl -e "check_job_list('$tmp/log3.out',1,2,3,4,5,7)"
+# Now we will verify that the pruning code is working as expected.  Each time,
+# we run 'list jobs', 'prune', 'list jobs'. check_prune_list ensures that jobids
+# in argument are present in the first 'list jobs', the 'prune' command deletes
+# them (same number), and checks that the last 'list jobs' doesn't contain them
+# anymore. See scripts/functions.pm for details.
+
+# M M g g F F I0 -> F
+$bperl -e "check_prune_list('$tmp/log10.out',1,2,3,4,5,7)"
 estat=$(($estat + $?))
 
 end_test