From: Kern Sibbald Date: Fri, 9 Sep 2005 11:16:02 +0000 (+0000) Subject: Update X-Git-Tag: Release-1.38.0~118 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=42ad9a0e09c03a5d08e869e3d2500a03cc2c556c;p=bacula%2Fbacula Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2386 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/tests/bextract-test b/regress/tests/bextract-test index 2702f1696f..b51f48f533 100755 --- a/regress/tests/bextract-test +++ b/regress/tests/bextract-test @@ -4,6 +4,13 @@ # split the archive into two volumes, then build a BSR with # the restore command and use bextract to restore the files. # +debug=0 +if test "$debug" -eq 1 ; then + out="tee" +else + out="output" +fi + cwd=`pwd` scripts/copy-test-confs scripts/cleanup @@ -15,11 +22,10 @@ echo " === Starting bextract-test at `date +%R:%S` ===" echo " === Starting bextract-test at `date +%R:%S` ===" >working/log echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -@output /dev/null +cat <tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out +@$out tmp/log1.out label storage=File1 volume=TestVolume001 label storage=File1 volume=TestVolume002 update Volume=TestVolume001 MaxVolBytes=3000000 @@ -29,14 +35,23 @@ messages @# @# now build the bsr file @# -@output tmp/log2.out +@$out tmp/log2.out restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done no wait messages -@output +@$out quit END_OF_DATA + +if test "$debug" -eq 1 ; then + bin/bacula start + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + bin/bacula start 2>&1 >/dev/null + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File1 bin/bacula stop 2>&1 >/dev/null mkdir -p ${cwd}/tmp/bacula-restores diff --git a/regress/tests/bscan-test b/regress/tests/bscan-test index 1db3c0b157..cff1a52022 100755 --- a/regress/tests/bscan-test +++ b/regress/tests/bscan-test @@ -5,6 +5,14 @@ # into the catalog after the backup. It also to a limited # extent tests the purge volume and delete volume commands. # + +debug=0 +if test "$debug" -eq 1 ; then + out="tee" +else + out="output" +fi + cwd=`pwd` scripts/copy-test-confs scripts/cleanup @@ -16,12 +24,10 @@ echo " === Starting bscan-test at `date +%R:%S` ===" echo " === Starting bscan-test at `date +%R:%S` ===" >working/log echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -#bin/bconsole -c bin/bconsole.conf <tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out +@$out tmp/log1.out label storage=File1 TestVolume001 label storage=File1 @@ -31,7 +37,7 @@ run job=NightlySave storage=File1 yes wait messages -@output /dev/null +@$out /dev/null @# @# now purge the Volume @# @@ -44,6 +50,15 @@ yes messages quit END_OF_DATA + +if test "$debug" -eq 1 ; then + bin/bacula start + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + bin/bacula start 2>&1 >/dev/null + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File1 bin/bacula stop 2>&1 >/dev/null echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr @@ -52,9 +67,9 @@ bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp bin/bacula start 2>&1 >/dev/null bin/bconsole -c bin/bconsole.conf <&1 >/dev/null #bin/bconsole -c bin/bconsole.conf <working/log echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -# bin/bconsole -c bin/bconsole.conf <tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out +@$out tmp/log1.out label storage=File1 volume=TestVolume001 label storage=File1 volume=TestVolume002 update Volume=TestVolume001 MaxVolBytes=3000000 @@ -32,7 +37,7 @@ messages @# @# now do a restore @# -@output tmp/log2.out +@$out tmp/log2.out restore bootstrap=${cwd}/working/restore.bsr where=${cwd}/tmp/bacula-restores select storage=File1 unmark * cd ${cwd}/build/src/cats @@ -42,9 +47,18 @@ done yes wait messages -@output +@$out quit END_OF_DATA + +if test "$debug" -eq 1 ; then + bin/bacula start + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + bin/bacula start 2>&1 >/dev/null + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File1 bin/bacula stop 2>&1 >/dev/null # diff --git a/regress/tests/restore-disk-seek-test b/regress/tests/restore-disk-seek-test index fda085da7f..9dd157abc2 100755 --- a/regress/tests/restore-disk-seek-test +++ b/regress/tests/restore-disk-seek-test @@ -6,6 +6,13 @@ # match. Even though disk seeking is not yet enabled, this is a good test, # and once it is enabled, this will test it. # +debug=0 +if test "$debug" -eq 1 ; then + out="tee" +else + out="output" +fi + cwd=`pwd` scripts/copy-test-confs scripts/cleanup @@ -36,13 +43,10 @@ echo " === Starting restore-disk-seek-test at `date +%R:%S` ===" echo " === Starting restore-disk-seek-test at `date +%R:%S` ===" >>working/log echo " " -bin/bacula start -v -v 2>&1 >/dev/null -#bin/bacula start -v -v -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -#bin/bconsole -c bin/bconsole.conf <tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out +@$out tmp/log1.out label storage=File volume=TestVolume001 run job=CompressedTest yes wait @@ -50,7 +54,7 @@ messages @# @# now do a restore @# -@output tmp/log2.out +@$out tmp/log2.out sql select * from JobMedia; @@ -61,9 +65,18 @@ restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=F yes wait messages -@output +@$out quit END_OF_DATA + +if test "$debug" -eq 1 ; then + bin/bacula start + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + bin/bacula start 2>&1 >/dev/null + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File bin/bacula stop 2>&1 >/dev/null # Now setup a control directory of only what we *should* restore