]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/differential-test
Update
[bacula/bacula] / regress / tests / differential-test
index a77ddb2fd10fd68be30324bd2410ac49ef476f65..7ef57dc220a09c54b04d05d1e05ac841640f57fd 100755 (executable)
@@ -6,12 +6,10 @@
 TestName="differential-test"
 JobName=differential
 . scripts/functions
-set_debug 0
 
-cwd=`pwd`
-scripts/copy-test-confs
 scripts/cleanup
-echo "${cwd}/tmp/build" >/tmp/file-list
+scripts/copy-test-confs
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 mkdir ${cwd}/tmp/build
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp
@@ -19,15 +17,16 @@ echo "${cwd}/tmp/build/ficheriro1.txt" >restore-list
 echo "${cwd}/tmp/build/ficheriro2.txt" >>restore-list
 cd ${cwd}
 
+change_jobname CompressedTest $JobName
 start_test
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @$out /dev/null
 messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
 label storage=File volume=TestVolume002
 label storage=File volume=TestVolume001
-run job=CompressedTest yes
+run job=$JobName yes
 wait
 messages
 quit
@@ -39,13 +38,13 @@ scripts/check_for_zombie_jobs storage=File
 echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @$out /dev/null
 messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
 @# Force differential on the second Volume
 update volume=TestVolume002 VolStatus=Used
-run level=differential job=CompressedTest yes
+run level=differential job=$JobName yes
 wait
 messages
 @$out
@@ -56,17 +55,17 @@ run_bconsole
 scripts/check_for_zombie_jobs storage=File
 echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @$out /dev/null
 messages
-@$out tmp/log1.out
-run level=incremental job=CompressedTest yes
+@$out ${cwd}/tmp/log1.out
+run level=incremental job=$JobName yes
 wait
 messages
 @# 
 @# now do a restore
 @#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list
 yes
 wait
@@ -83,6 +82,6 @@ check_two_logs
 #
 # Delete .c files because we will only restore the txt files
 #
-rm -f tmp/build/*.c
+rm -f ${cwd}/tmp/build/*.c
 check_restore_tmp_build_diff
 end_test