X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Frestore-disk-seek-test;h=495bb45ca224727f7a7eff661ff2428e3f9f1fcc;hb=4d691342d4786448f9e8f0ebf95a958f3169c9d1;hp=c82d011b7574971a8892fbb0f15882e243cf6f2c;hpb=20f304209a1e9c34f39bce7d0ee4dff3939a4509;p=bacula%2Fbacula diff --git a/regress/tests/restore-disk-seek-test b/regress/tests/restore-disk-seek-test index c82d011b75..495bb45ca2 100755 --- a/regress/tests/restore-disk-seek-test +++ b/regress/tests/restore-disk-seek-test @@ -9,13 +9,12 @@ TestName="restore-disk-seek-test" JobName=restore-disk-seek . scripts/functions -set_debug 1 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 <tmp/bconcmds +cat <${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