]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Fri, 13 Oct 2006 09:10:01 +0000 (09:10 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 13 Oct 2006 09:10:01 +0000 (09:10 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3552 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/prepare-two-tapes.in
regress/tests/2drive-incremental-2disk
regress/tests/truncate-bug-tape
regress/tests/two-pool-tape

index f31c0abe557df188a65562742d5e86879350714d..8d47b7e8c0bbb2ca8960da6c94fe1539211ca685 100755 (executable)
@@ -2,6 +2,7 @@
 #
 # Create two blank tapes
 #
+# mt -f @tape_drive@ offline
 @changer_path@ -f @autochanger@ unload
 @changer_path@ -f @autochanger@ load 1
 mt -f @tape_drive@ rewind
index f3972b0adc01453de5f9eafe382c92247407b9ed..b5eed3ca447dd17dd55f9fc7c3b3629714a8f1f5 100755 (executable)
@@ -6,22 +6,20 @@
 # This script uses the virtual disk autochanger and two drives
 #
 . config.out
-debug=0
-if test "$debug" -eq 1 ; then
-  out="tee"
-else
-  out="output"
-fi
+TestName="2drive-incremental-2disk"
+JobName="2drive2disk"
+. scripts/functions
+set_debug 1
+
 cwd=`pwd`
-bin/bacula stop  2>&1 >/dev/null
-cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
-cd ..
 
+scripts/cleanup
 scripts/copy-2disk-drive-confs
 scripts/prepare-two-disks
+
+change_jobname localhost-fd $JobName
+start_test
+
 echo "${cwd}/tmp/build" >/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
    mkdir ${cwd}/tmp/build
@@ -40,12 +38,6 @@ cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
 #  otherwise, it writes the two jobs to different drives
 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
 
-echo " "
-echo " "
-echo " === Starting 2drive-incremental-2disk test ==="
-echo " === Starting 2drive-incremental-2disk test ===" >>working/log
-echo " "
-
 # Write out bconsole commands
 cat <<END_OF_DATA >tmp/bconcmds
 @output /dev/null
@@ -53,7 +45,8 @@ messages
 @$out tmp/log1.out
 label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0
 label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1
-setdebug level=100 storage=DDS-4
+status storage=DDS-4
+@#setdebug level=120 storage=DDS-4
 run job=NightlySave yes
 run job=NightlySave yes
 run job=NightlySave yes
@@ -69,13 +62,7 @@ messages
 quit
 END_OF_DATA
 
-if test "$debug" -eq 1 ; then
-  bin/bacula start
-  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
-else
-  bin/bacula start 2>&1 >/dev/null
-  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
-fi
+run_bacula
 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
 
@@ -86,7 +73,7 @@ messages
 @# Force Incremental on the second Volume
 update volume=TestVolume001 VolStatus=Used
 status storage=DDS-4
-@#setdebug level=400 storage=DDS-4
+@#setdebug level=120 storage=DDS-4
 run level=Incremental job=NightlySave yes
 wait
 list volumes
@@ -106,30 +93,22 @@ messages
 @$out
 quit
 END_OF_DATA
-if test "$debug" -eq 1 ; then
-  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
-else
-  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
+
+run_bconsole
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+check_two_logs
+# The restore should read from TestVolume002, which was on drive 1
+grep tmp/log2.out TestVolume002
+if [ $? != 0 ] ; then
+   rstat=$?
 fi
 
-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=$?
 #
 # Delete .c files because we will only restored the txt files
 #
 rm -f tmp/build/*.c
-diff -r tmp/build tmp/bacula-restores${cwd}/tmp/build 2>&1 >/dev/null
-if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
-   echo " "
-   echo " "
-   echo "  !!!!! 2drive-incremental-2disk test Bacula source failed!!! !!!!! "
-   echo "  !!!!! 2drive-incremental-2disk test failed!!! !!!!! " >>test.out
-   echo " "
-else
-   echo "  ===== 2drive-incremental-2disk test Bacula source OK ===== "
-   echo "  ===== 2drive-incremental-2disk test OK ===== " >>test.out
-   scripts/cleanup
-fi
+check_restore_tmp_build_diff
+
+end_test
index 635b4dfa5284a5827f1ce173b336198c3fad5cd8..2273044fe5f971ae78d6a7375da8b695c0cccbc3 100755 (executable)
@@ -6,7 +6,7 @@ TestName="truncate-bug-tape"
 JobName=truncatebug
 . scripts/functions
 
-set_debug 0
+set_debug 1
 copy_tape_confs
 
 echo "${cwd}/build" >/tmp/file-list
@@ -32,6 +32,7 @@ run level=Full job=$JobName yes
 run level=Full job=$JobName yes
 run level=Full job=$JobName yes
 run level=Full job=$JobName yes
+@#setdebug level=100 storage=DDS-4
 wait
 messages
 quit
index e7976181e1c687ee9d8da4ba44bc655381aa8adb..9da395ae697b013066e228c212b42a75891a1dad 100755 (executable)
@@ -20,7 +20,9 @@ fi
 
 scripts/cleanup
 scripts/copy-2tape-confs
+echo "Prepare two tapes"
 scripts/prepare-two-tapes
+echo "Done prepare two tapes"
  
 # Make a relatively large backup set 5 x source code directory
 echo "${cwd}/build" >/tmp/file-list