From: Kern Sibbald Date: Mon, 16 Jun 2003 22:11:24 +0000 (+0000) Subject: Cleanup tests + test Termination status X-Git-Tag: Release-1.31~72 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60f97ece975b02e58af9cda123e541a4fecd5445;p=bacula%2Fbacula Cleanup tests + test Termination status git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@584 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index 5875ba6c14..123cc0eb66 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -16,11 +16,11 @@ echo " === Starting Backup Bacula Test ===" echo " === Starting Backup Bacula Test ===" >>working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&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 -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== Backup Bacula Test failed!!! ===== " diff --git a/regress/tests/bscan-test b/regress/tests/bscan-test index 98278b2e55..8de719c964 100755 --- a/regress/tests/bscan-test +++ b/regress/tests/bscan-test @@ -19,10 +19,10 @@ echo " === Starting bscan-test ===" echo " === Starting bscan-test ===" >working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&1 >/dev/null echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr -bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp -bin/bacula start +bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >/dev/null +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&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 -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== bscan-test Bacula source failed!!! ===== " diff --git a/regress/tests/compressed-test b/regress/tests/compressed-test index 72792475e1..feaaeb1667 100755 --- a/regress/tests/compressed-test +++ b/regress/tests/compressed-test @@ -17,11 +17,10 @@ echo " === Starting compressed-test ===" echo " === Starting compressed-test ===" >>working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&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 -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== compressed-test Bacula source failed!!! ===== " diff --git a/regress/tests/six-vol-test b/regress/tests/six-vol-test index d1a012e26d..913069ac8d 100755 --- a/regress/tests/six-vol-test +++ b/regress/tests/six-vol-test @@ -26,10 +26,10 @@ echo " === Starting six-vol-test ===" echo " === Starting six-vol-test ===" >>working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&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 tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== six-vol-test Bacula source failed!!! ===== " diff --git a/regress/tests/sparse-compressed-test b/regress/tests/sparse-compressed-test index c209aca8ed..e8513a3f35 100755 --- a/regress/tests/sparse-compressed-test +++ b/regress/tests/sparse-compressed-test @@ -17,11 +17,10 @@ echo " === Starting sparse-compressed-test ===" echo " === Starting sparse-compressed-test ===" >>working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&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 -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== sparse-compressed-test Bacula source failed!!! ===== " diff --git a/regress/tests/sparse-test b/regress/tests/sparse-test index f04f2f6009..beb38ce1c8 100755 --- a/regress/tests/sparse-test +++ b/regress/tests/sparse-test @@ -19,9 +19,8 @@ echo " " bin/bacula start bin/console -c bin/console.conf <&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 -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== sparse-test Bacula source failed!!! ===== " diff --git a/regress/tests/two-jobs-test b/regress/tests/two-jobs-test index 3966eaaba6..a3ab1df70b 100755 --- a/regress/tests/two-jobs-test +++ b/regress/tests/two-jobs-test @@ -17,10 +17,10 @@ echo " === Starting two-jobs-test ===" echo " === Starting two-jobs-test ===" >>working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&1 >/dev/null diff -r build /tmp/bacula-restores${cwd}/build if [ $? != 0 ] ; then echo " " diff --git a/regress/tests/two-vol-test b/regress/tests/two-vol-test index 25a30f3581..3b6fbf044f 100755 --- a/regress/tests/two-vol-test +++ b/regress/tests/two-vol-test @@ -17,9 +17,9 @@ echo " === Starting two-vol-test ===" echo " === Starting two-vol-test ===" >working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&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 -if [ $? != 0 ] ; then +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " ===== two-vol-test Bacula source failed!!! ===== " diff --git a/regress/tests/verify-vol-test b/regress/tests/verify-vol-test index a39ba27b13..36487d23b5 100755 --- a/regress/tests/verify-vol-test +++ b/regress/tests/verify-vol-test @@ -17,11 +17,10 @@ echo " === Starting verify Volume Test ===" echo " === Starting verify Volume Test ===" >>working/log echo " " -bin/bacula start +bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <&1 >/dev/null -if [ $? != 0 ] ; then +bin/bacula stop 2>&1 >/dev/null +grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null +if [ $? != 0 -o $bstat != 0 ] ; then echo " " echo " " echo " ===== Verify Volume failed!!! ===== "