From: Eric Bollengier Date: Mon, 21 Feb 2011 14:14:54 +0000 (+0100) Subject: regress: tweak restart base job X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=26292b4cff6873c13443cc2940e0912f99bb0d45;p=bacula%2Fbacula regress: tweak restart base job --- diff --git a/regress/tests/restart-base-job-test b/regress/tests/restart-base-job-test index 3dce0d2ed6..3a6a2dc530 100755 --- a/regress/tests/restart-base-job-test +++ b/regress/tests/restart-base-job-test @@ -31,6 +31,8 @@ setdebug level=0 trace=0 hangup=100 client run job=$JobName yes wait messages +@$out ${cwd}/tmp/log3.out +list jobs quit END_OF_DATA @@ -58,4 +60,21 @@ stop_bacula check_two_logs check_restore_diff + +nb_B=`awk -F '|' '/RestartJob.+ B.+ B/ { gsub(/,/, "");print $7}' $tmp/log3.out` +nb_F=`awk -F '|' '/RestartJob.+F/ { gsub(/,/, ""); print $7}' $tmp/log3.out` + +if [ $nb_F -ne $nb_B ]; then + print_debug "ERROR: Base and Full should have the same number of files" + estat=1 +fi + +nb_B=`awk -F '|' '/RestartJob.+B.+B/ { gsub(/,/, ""); print $8}' $tmp/log3.out` +nb_F=`awk -F '|' '/RestartJob.+F/ { gsub(/,/, ""); print $8}' $tmp/log3.out` + +if [ $nb_F -gt 1000000 ]; then + print_debug "ERROR: Base job should backup only one file" + estat=2 +fi + end_test