]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/backup-bacula-test
Update disk tests
[bacula/bacula] / regress / tests / backup-bacula-test
index 3e81db61a082940abb9d9b97eeb89f7360a894ef..bf329d125a263c48007e4a5ce5e05980a8b72eb3 100755 (executable)
@@ -3,54 +3,60 @@
 # Run a simple backup of the Bacula build directory
 #   then restore it.
 #
-cwd=`pwd`
+TestName="backup-bacula-test"
+JobName=backup
+. scripts/functions
+set_debug 0
+
 scripts/copy-confs
 scripts/cleanup
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
 
-echo " "
-echo " "
-echo " === Starting Backup Bacula Test ==="
-echo " === Starting Backup Bacula Test ===" >>tmp/log
-echo " "
+change_jobname Client1 $JobName
+start_test
 
-bin/bacula start
-bin/console -c bin/console.conf <<END_OF_DATA
+cat <<END_OF_DATA >tmp/bconcmds
 @output /dev/null
 messages
-@output
-label
-TestVolume001
-run job=NightlySave
-yes
+@$out tmp/log1.out
+label volume=TestVolume001
+@#setdebug level=100 storage=File
+run job=$JobName yes
+status storage=File
+status storage=File
+status storage=File
+status storage=File
+status storage=File
+status storage=File
+@sleep 1
+status storage=File
+status storage=File
+status storage=File
+status storage=File
+status storage=File
+@sleep 1
+status storage=File
+status storage=File
+status storage=File
+status storage=File
+status storage=File
 wait
 messages
 @# 
 @# now do a restore
 @#
-restore
-5
-done
+@$out tmp/log2.out  
+restore where=${cwd}/tmp/bacula-restores select all done
 yes
-@sleep 1
 wait
-@output /dev/null
 messages
+@$out
 quit
 END_OF_DATA
-sleep 2
-bin/bacula stop
-diff -ur build /tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
-   echo " "
-   echo " "
-   echo "  ===== Backup Bacula Test failed!!! ===== "
-   echo "  ===== Backup Bacula Test failed!!! ===== " >>test.out
-   echo " "
-else
-   echo "  ===== Backup Bacula Test OK ===== "
-   echo "  ===== Backup Bacula Test OK ===== " >>test.out
-   scripts/cleanup
-fi
+
+run_bacula
+check_for_zombie_jobs storate=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test