X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Ffour-jobs-test;h=1a56a8703727a50bd3c5ed2439ae239d4fd805d5;hb=8ee711f2e7b445b00de916f5712c59749afc2407;hp=a312b386e6b1c9ac10bb55f43905ff6c1db9b2e9;hpb=c4d3e4a4f6af72c0003ca8b062b6085bc4987d45;p=bacula%2Fbacula diff --git a/regress/tests/four-jobs-test b/regress/tests/four-jobs-test index a312b386e6..1a56a87037 100755 --- a/regress/tests/four-jobs-test +++ b/regress/tests/four-jobs-test @@ -4,32 +4,33 @@ # then backup four times, each with incremental then finally restore. # It should require at least 4 different bsrs. # -cwd=`pwd` -scripts/copy-test-confs +TestName="four-jobs-test" +JobName=SpanVol +. scripts/functions + scripts/cleanup -echo "${cwd}/build" >/tmp/file-list +scripts/copy-test-confs +echo "${cwd}/build" >${cwd}/tmp/file-list -echo " " -echo " " -echo " === Starting four-jobs-test ===" -echo " === Starting four-jobs-test ===" >>working/log -echo " " +change_jobname CompressedTest $JobName +start_test -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null +estimate job=$JobName listing +estimate job=$JobName +estimate job=$JobName messages -@output tmp/log1.out +@$out ${cwd}/tmp/log1.out label storage=File volume=TestVolume001 -run job=CompressedTest yes +run job=$JobName yes wait messages quit END_OF_DATA -scripts/check_for_zombie_jobs storage=File + +run_bacula +check_for_zombie_jobs storage=File echo "Backup 1 done" # make some files for the incremental to pick up touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o @@ -38,64 +39,70 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a second job # -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out -run job=CompressedTest -yes +@$out ${cwd}/tmp/log1.out +run job=$JobName yes wait messages quit END_OF_DATA -scripts/check_for_zombie_jobs storage=File + +run_bconsole +check_for_zombie_jobs storage=File + echo "Backup 2 done" touch ${cwd}/build/src/dird/*.c touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a third job # -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out -label storage=File volume=TestVolume001 -run job=CompressedTest yes +@$out ${cwd}/tmp/log1.out +run job=$JobName yes wait messages quit END_OF_DATA -scripts/check_for_zombie_jobs storage=File + +run_bconsole +check_for_zombie_jobs storage=File + echo "Backup 3 done" # make some files for the incremental to pick up touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a fourth job # -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out -label storage=File volume=TestVolume001 -run job=CompressedTest yes +@$out ${cwd}/tmp/log1.out +run job=$JobName yes wait messages quit END_OF_DATA -scripts/check_for_zombie_jobs storage=File + +run_bconsole +check_for_zombie_jobs storage=File + echo "Backup 4 done" # # now do several restores to ensure we cleanup between jobs # -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null restore where=${cwd}/tmp/bacula-restores select all storage=File done yes wait restore where=${cwd}/tmp/bacula-restores select all storage=File done yes wait -@output tmp/log2.out +@$out ${cwd}/tmp/log2.out restore where=${cwd}/tmp/bacula-restores select storage=File unmark * mark * @@ -103,24 +110,13 @@ done yes wait messages -@output quit END_OF_DATA -scripts/check_for_zombie_jobs storage=File -bin/bacula stop 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 -rstat=$? -diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! four-jobs-test Bacula source failed!!! !!!!! " - echo " !!!!! four-jobs-test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== four-jobs-test Bacula source OK ===== " - echo " ===== four-jobs-test OK ===== " >>test.out - scripts/cleanup -fi + +run_bconsole +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +check_restore_diff +end_test