]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/incremental-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / incremental-test
index 80ac6ee7ee5a523c839a3f6f750b3549ef80d143..dd9a45636856f7fd7c2c5e762698dbc18797df9b 100755 (executable)
@@ -1,4 +1,9 @@
 #!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
 #
 # Run a simple backup of the Bacula build directory then create some           
 #   new files, do an Incremental and restore those two files.
 TestName="incremental-test"
 JobName=Incremental 
 . scripts/functions
-set_debug 0
-
-scripts/cleanup
-scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
-mkdir ${cwd}/tmp/build
-cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
-cd ${cwd}/tmp
-echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
-echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
+
+${rscripts}/cleanup
+${rscripts}/copy-test-confs
+echo "${tmpsrc}" >${tmp}/file-list
+mkdir -p ${tmpsrc}
+cp -p ${src}/src/dird/*.c ${tmpsrc}
+cd ${tmp}
+echo "${tmpsrc}/ficheriro1.txt" >restore-list
+echo "${tmpsrc}/ficheriro2.txt" >>restore-list
 cd ${cwd}
 
 change_jobname CompressedTest $JobName
 start_test
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
+@#setdebug level=200 client
+@#setdebug level=100 director
 label storage=File volume=TestVolume001
 label storage=File volume=TestVolume002
 run job=$JobName yes
+status client
 wait
 messages
 quit
@@ -39,14 +47,15 @@ check_for_zombie_jobs storage=File
 # Now create two new files to be restored later
 #
 sleep 1
-echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
-cp -f ${cwd}/tmp/build/dird.c ${cwd}/tmp/build/ficheriro2.txt
+echo "ficheriro1.txt" >${tmpsrc}/ficheriro1.txt
+cp -f ${tmpsrc}/dird.c ${tmpsrc}/ficheriro2.txt
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
 @# Force Incremental on the second Volume
+setdebug level=4 storage=File
 update volume=TestVolume001 VolStatus=Used
 run level=Differential job=$JobName yes
 wait
@@ -57,13 +66,14 @@ END_OF_DATA
 run_bconsole
 
 sleep 1
-touch ${cwd}/tmp/build/ficheriro1.txt
-touch ${cwd}/tmp/build/ficheriro2.txt
+touch ${tmpsrc}/ficheriro1.txt
+touch ${tmpsrc}/ficheriro2.txt
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
 run level=Incremental job=$JobName yes
 wait
 messages
@@ -73,15 +83,16 @@ END_OF_DATA
 run_bconsole
 
 sleep 1
-cd ${cwd}/tmp/build
+cd ${tmpsrc}
 cp -f ficheriro2.txt 1
 sed "s%a%b%g" 1 >ficheriro2.txt
 rm -f 1
 cd ${cwd}
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
 run level=Differential job=$JobName yes
 wait
 messages
@@ -91,12 +102,13 @@ END_OF_DATA
 run_bconsole
 
 sleep 1
-touch ${cwd}/tmp/build/ficheriro1.txt
-touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+touch ${tmpsrc}/ficheriro1.txt
+touch ${tmpsrc}/ficheriro2.txt
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
 run level=Incremental job=$JobName yes
 wait
 messages
@@ -106,12 +118,13 @@ END_OF_DATA
 run_bconsole
 
 sleep 1
-touch ${cwd}/tmp/build/ficheriro1.txt
-touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+touch ${tmpsrc}/ficheriro1.txt
+touch ${tmpsrc}/ficheriro2.txt
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
 run level=Incremental job=$JobName yes
 wait
 messages
@@ -121,12 +134,13 @@ END_OF_DATA
 run_bconsole
 
 sleep 1
-touch ${cwd}/tmp/build/ficheriro1.txt
-touch ${cwd}/tmp/build/ficheriro2.txt
-cat <<END_OF_DATA >tmp/bconcmds
+touch ${tmpsrc}/ficheriro1.txt
+touch ${tmpsrc}/ficheriro2.txt
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
 run level=Incremental job=$JobName yes
 wait
 messages
@@ -135,25 +149,28 @@ END_OF_DATA
 
 run_bconsole
 sleep 1
-touch ${cwd}/tmp/build/ficheriro1.txt
-touch ${cwd}/tmp/build/ficheriro2.txt
+touch ${tmpsrc}/ficheriro1.txt
+touch ${tmpsrc}/ficheriro2.txt
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${tmp}/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out ${tmp}/log1.out
+setdebug level=4 storage=File
 run level=Incremental job=$JobName yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-@output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
+@$out ${tmp}/log2.out
+setdebug level=10 storage=File
+restore where=${tmp}/bacula-restores storage=File file=<${tmp}/restore-list
 yes
 wait
+status client
+status storage=File
 messages
-@output
 quit
 END_OF_DATA
 
@@ -165,6 +182,6 @@ check_two_logs
 #
 # Delete .c files because we will only restored the txt files
 #
-rm -f tmp/build/*.c
+rm -f ${tmpsrc}/*.c
 check_restore_tmp_build_diff
 end_test