]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/backup-bacula-test
ebl add runscript regression script (not yet works well)
[bacula/bacula] / regress / tests / backup-bacula-test
index 5875ba6c14584e75970f0c850b5e8b57b0dd292d..7f50f4674c686330d574ce41bd794e2cbae32342 100755 (executable)
@@ -3,54 +3,60 @@
 # Run a simple backup of the Bacula build directory
 #   then restore it.
 #
-cwd=`pwd`
-scripts/copy-confs
+TestName="backup-bacula-test"
+JobName=backup
+. scripts/functions
+set_debug 0
+
 scripts/cleanup
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
+scripts/copy-confs
 
-echo " "
-echo " "
-echo " === Starting Backup Bacula Test ==="
-echo " === Starting Backup Bacula Test ===" >>working/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=Client1
-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 -r 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 storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test