X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fincremental-test;h=9d5aeee25ebcbb7483ce5ccd4bded9d30b8991d9;hb=e1d2438958fff71fe6d2e64398733825ef520ce7;hp=0c442894e1c4cb27964ab64c36c10e21b31748cd;hpb=bd1975d9d3da8162240c6e2895d1a97a209c7c92;p=bacula%2Fbacula diff --git a/regress/tests/incremental-test b/regress/tests/incremental-test index 0c442894e1..9d5aeee25e 100755 --- a/regress/tests/incremental-test +++ b/regress/tests/incremental-test @@ -13,12 +13,6 @@ cd ${cwd}/tmp echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list cd ${cwd} -bin/bacula stop 2>&1 >/dev/null -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. echo " " echo " " @@ -38,14 +32,94 @@ wait messages quit END_OF_DATA +scripts/check_for_zombie_jobs storage=File +# +# Now create two new files to be restored later +# +sleep 1 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt -echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt +cp -f ${cwd}/tmp/build/dird.c ${cwd}/tmp/build/ficheriro2.txt bin/bconsole -c bin/bconsole.conf <ficheriro2.txt +rm -f 1 +cd ${cwd} +bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null bstat=$? -grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null +grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null rstat=$? # # Delete .c files because we will only restored the txt files @@ -78,6 +150,13 @@ if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " !!!!! incremental-test Bacula source failed!!! !!!!! " echo " !!!!! incremental-test failed!!! !!!!! " >>test.out + if [ $bstat != 0 -o $rstat != 0 ] ; then + echo " !!!!! Bad Job termination status !!!!! " + echo " !!!!! Bad Job termination status !!!!! " >>test.out + else + echo " !!!!! Restored files differ !!!!! " + echo " !!!!! Restored files differ !!!!! " >>test.out + fi echo " " else echo " ===== incremental-test Bacula source OK ===== "