]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/restore-disk-seek-test
update speed-test
[bacula/bacula] / regress / tests / restore-disk-seek-test
index 72183a659a433197f0381df3eaf89cd1d89e8fd0..495bb45ca224727f7a7eff661ff2428e3f9f1fcc 100755 (executable)
@@ -9,13 +9,12 @@
 TestName="restore-disk-seek-test"
 JobName=restore-disk-seek
 . scripts/functions
-set_debug 0
 
 scripts/cleanup
 scripts/copy-test-confs
-echo "${cwd}/tmp/build" >/tmp/file-list
+echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 rm -rf ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 # Copy only the .c files (to be restored)
 #  set files to "*.c" for all c files
 files="ua_tree.c ua_update.c"
@@ -26,7 +25,7 @@ done
 cd ${cwd}/tmp/build
 ls >../1
 cd ..
-sed s%\^%${cwd}/tmp/build/% 1 >restore-list
+sed s%\^%${cwd}/tmp/build/% 1 | sort | uniq >restore-list
 #
 # At this point restore-list contains the list
 #  of files we will restore
@@ -37,7 +36,7 @@ cd ${cwd}
 # Now arrange to backup *everything* 
 #
 rm -rf  ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
 #
 # Enable MaximumFileSize to ensure lots of JobMedia records and thus
@@ -49,10 +48,10 @@ sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula
 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=TestVolume001
 run job=$JobName yes
 wait
@@ -60,7 +59,7 @@ messages
 @# 
 @# now do a restore
 @#
-@$out tmp/log2.out
+@$out ${cwd}/tmp/log2.out
 setdebug level=30 fd     
 setdebug level=11 storage=File
 sql
@@ -74,7 +73,6 @@ restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=F
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
@@ -84,7 +82,7 @@ stop_bacula
 
 # Now setup a control directory of only what we *should* restore
 rm -rf ${cwd}/tmp/build
-mkdir  ${cwd}/tmp/build
+mkdir -p  ${cwd}/tmp/build
 for i in ${files}; do
    cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build
 done