X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fcompressed-test;h=47fc8e4362e392ccc39957cab40a26915de8a190;hb=ef33273cecc466a71ce597c06024d8fac53fbe1d;hp=ea93469a4a7209bf0b241dd0301ec47b1f86a41f;hpb=e54ed58d45a9f0ab037c477294a66e95ffc4373b;p=bacula%2Fbacula diff --git a/regress/tests/compressed-test b/regress/tests/compressed-test index ea93469a4a..47fc8e4362 100755 --- a/regress/tests/compressed-test +++ b/regress/tests/compressed-test @@ -3,33 +3,32 @@ # Run a simple backup of the Bacula build directory using the compressed option # then restore it. # -cwd=`pwd` -scripts/copy-test-confs -scripts/cleanup -echo "${cwd}/build" >/tmp/file-list +TestName="compressed-test" +JobName=compressed +. scripts/functions -echo " " -echo " " -echo " === Starting compressed-test `date +%R:%S` ===" -echo " === Starting compressed-test `date +%R:%S` ===" >>working/log -echo " " +scripts/cleanup +scripts/copy-test-confs +echo "${cwd}/build" >${cwd}/tmp/file-list -bin/bacula start 2>&1 >/dev/null -exit -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@output +messages +@$out ${cwd}/tmp/log1.out status all status all messages -@tee tmp/log1.out label storage=File volume=TestVolume001 -run job=CompressedTest storage=File yes +run job=$JobName storage=File yes wait messages @# @# now do a restore @# -@tee tmp/log2.out +@$out ${cwd}/tmp/log2.out restore where=${cwd}/tmp/bacula-restores select storage=File unmark * mark * @@ -37,31 +36,19 @@ done yes wait messages -@tee +@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 " !!!!! compressed-test Bacula source failed!!! !!!!! " - echo " !!!!! compressed-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 " ===== compressed-test Bacula source OK ===== " - echo " ===== compressed-test OK ===== " >>test.out - scripts/cleanup + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +check_restore_diff +grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null +if [ $? != 0 ] ; then + echo " !!!!! No compression !!!!!" + bstat=1 fi +end_test