From: Eric Bollengier Date: Wed, 3 Feb 2021 15:42:22 +0000 (+0100) Subject: regress: Fix prune-migration-test with new copy/migration selection algorithm X-Git-Tag: Release-11.0.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f87b64311c2ac5b65d792075fa81950bc370cc42;p=thirdparty%2Fbacula.git regress: Fix prune-migration-test with new copy/migration selection algorithm --- diff --git a/regress/tests/prune-migration-test b/regress/tests/prune-migration-test index 9f10f3575..60da5b6bf 100755 --- a/regress/tests/prune-migration-test +++ b/regress/tests/prune-migration-test @@ -38,7 +38,6 @@ cat <${cwd}/tmp/bconcmds @output /dev/null messages @$out ${cwd}/tmp/log1.out -setdebug level=100 storage=File label storage=File volume=FileVolume001 Pool=Default label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0 @@ -72,13 +71,13 @@ messages @$out $cwd/tmp/log10.out setdebug level=1 director sql -SELECT JobId, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId; +SELECT JobId, Name, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId; list jobs prune jobs yes list jobs sql -SELECT JobId, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId; +SELECT JobId, Name, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId; @$out $cwd/tmp/log11.out sql @@ -119,10 +118,15 @@ check_restore_diff # So, we get it from the job list to exclude it and build the check_prune_list id=`awk '/ [0-9] / { print $2 }' $tmp/log11.out` +if [ "$id" = "" ]; then + print_debug "ERROR: Unable to determine the id in $tmp/log11.out" + estat=1 +fi + jobid=1 -for i in `seq 2 9` +for i in `seq 2 7` do - if [ $i != $id ]; then + if [ "$i" != "$id" ]; then jobid="$jobid,$i" fi done