]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/compressed-test
Updates
[bacula/bacula] / regress / tests / compressed-test
index aee18ae874876d45661a6832c49584661b4d7369..c373a5878529ba513c071229821ebc594a132812 100755 (executable)
@@ -7,51 +7,58 @@ cwd=`pwd`
 scripts/copy-test-confs
 scripts/cleanup
 echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop  2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
 
 echo " "
 echo " "
-echo " === Starting compressed-test ==="
-echo " === Starting compressed-test ===" >>working/log
+echo " === Starting compressed-test at `date +%R:%S` ==="
+echo " === Starting compressed-test at `date +%R:%S` ===" >>working/log
 echo " "
 
 bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
+exit
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
+@tee /dev/null
+status all
+status all
 messages
-@output tmp/log1.out
-label storage=File
-TestVolume001
-run job=CompressedTest
-yes
+@tee tmp/log1.out
+label storage=File volume=TestVolume001
+run job=CompressedTest storage=File yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-@output tmp/log2.out
-restore
-5
+@tee tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=File
+unmark *
+mark *
 done
 yes
 wait
 messages
-@output
+@tee
 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
+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=$?
-diff -r build /tmp/bacula-restores${cwd}/build
+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 ===== "