]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/compressed-test
ebl add runscript regression script (not yet works well)
[bacula/bacula] / regress / tests / compressed-test
index aee18ae874876d45661a6832c49584661b4d7369..ff92a49dc2d451454de2f16478d00d1312a76c48 100755 (executable)
@@ -3,37 +3,36 @@
 # Run a simple backup of the Bacula build directory using the compressed option
 #   then restore it.
 #
-cwd=`pwd`
-scripts/copy-test-confs
+TestName="compressed-test"
+JobName=compressed
+. scripts/functions
+set_debug 0
+
 scripts/cleanup
+scripts/copy-test-confs
 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 " "
-
-bin/bacula start 2>&1 >/dev/null
-bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
+change_jobname CompressedTest $JobName
+start_test
+      
+cat <<END_OF_DATA >tmp/bconcmds
+@output
 messages
-@output tmp/log1.out
-label storage=File
-TestVolume001
-run job=CompressedTest
-yes
+@$out tmp/log1.out
+status all
+status all
+messages
+label storage=File volume=TestVolume001
+run job=$JobName storage=File yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-@output tmp/log2.out
-restore
-5
+@$out tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=File
+unmark *
+mark *
 done
 yes
 wait
@@ -41,20 +40,11 @@ messages
 @output
 quit
 END_OF_DATA
-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
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
-   echo " "
-   echo " "
-   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
-   scripts/cleanup
-fi
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test