X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fbscan-tape;h=8c98c1e3e7141bba516cb3f576a344309949c09c;hb=7d5eacc922052324417c82382d6a18e8054245e8;hp=6efeaebfdde9de2fb1dad0c1770ed2e788189028;hpb=f71c86eff72b41d7b0b708357415c716057ed294;p=bacula%2Fbacula diff --git a/regress/tests/bscan-tape b/regress/tests/bscan-tape index 6efeaebfdd..8c98c1e3e7 100755 --- a/regress/tests/bscan-tape +++ b/regress/tests/bscan-tape @@ -5,10 +5,12 @@ # do a bscan and restore. # It should require at least 4 different bsrs. # -TestName="bscan-1t1d-tape" +TestName="bscan-tape" JobName=bscantape . scripts/functions +require_tape_drive + copy_tape_confs echo "${cwd}/build" >tmp/file-list @@ -23,14 +25,11 @@ cat <tmp/bconcmds @output /dev/null estimate job=$JobName listing estimate job=$JobName listing -estimate job=$JobName listing messages @$out tmp/log1.out setdebug level=2 storage=DDS-4 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default -run job=$JobName yes -wait -run job=$JobName level=Full yes +run job=$JobName level=Full yes wait run job=$JobName level=Full yes wait @@ -59,7 +58,7 @@ messages quit END_OF_DATA -run_bacula +run_bconsole scripts/check_for_zombie_jobs storage=DDS-4 echo "Backup 2 done" @@ -68,17 +67,8 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a third job # -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA -run_bacula +run_bconsole scripts/check_for_zombie_jobs storage=DDS-4 echo "Backup 3 done" @@ -88,19 +78,10 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a fourth job # -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA - -run_bacula +run_bconsole scripts/check_for_zombie_jobs storage=DDS-4 + stop_bacula echo "Backup 4 done" @@ -114,12 +95,24 @@ cd bin cd .. echo "volume=TestVolume001" >tmp/bscan.bsr + +bscan_libdbi + +# If the database has a password pass it to bscan +if test "x${db_password}" = "x"; then + PASSWD= +else + PASSWD="-P ${db_password}" +fi + if test "$debug" -eq 1 ; then - bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 + $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 else - bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null + $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 >/dev/null 2>&1 fi +echo $BSCANLIBDBI + cat <tmp/bconcmds @$out /dev/null messages @@ -127,7 +120,7 @@ messages @# @# now do a restore @# -restore where=tmp/bacula-restores select all storage=DDS-4 done +restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done yes wait messages