]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/compressed-test
Flush changes
[bacula/bacula] / regress / tests / compressed-test
index 82ff4f54a09dab691d8d0c2546ce591a03320278..983c114e270d0f0f5e87e5ca004251b6fc7afb92 100755 (executable)
@@ -5,50 +5,61 @@
 #
 cwd=`pwd`
 scripts/copy-test-confs
-rm -rf /tmp/TestVolume001 /tmp/bacula-restores
+scripts/cleanup
 echo "${cwd}/build" >/tmp/file-list
 bin/bacula stop  2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
+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 " "
 echo " === Starting compressed-test ==="
+echo " === Starting compressed-test ===" >>working/log
 echo " "
 
-bin/bacula start
-bin/console -c bin/console.conf <<END_OF_DATA
+bin/bacula start 2>&1 >/dev/null
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
 @output /dev/null
+status all
+status all
 messages
-@output
-label storage=File
-TestVolume001
-run job=CompressedTest
-yes
+@output tmp/log1.out
+label storage=File volume=TestVolume001
+run job=CompressedTest yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-restore
-5
+@output tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=File
+unmark *
+mark *
 done
 yes
 wait
-@output /dev/null
 messages
+@output
 quit
 END_OF_DATA
-bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+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
+   echo "  !!!!! compressed-test Bacula source failed!!! !!!!! "
+   echo "  !!!!! compressed-test failed!!! !!!!! " >>test.out
    echo " "
 else
    echo "  ===== compressed-test Bacula source OK ===== "
    echo "  ===== compressed-test OK ===== " >>test.out
-   rm -rf /tmp/bacula-restores /tmp/TestVolume001
+   scripts/cleanup
 fi