]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Fri, 9 Sep 2005 11:16:02 +0000 (11:16 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 9 Sep 2005 11:16:02 +0000 (11:16 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2386 91ce42f0-d328-0410-95d8-f526ca767f89

regress/tests/bextract-test
regress/tests/bscan-test
regress/tests/bsr-opt-test
regress/tests/restore-disk-seek-test

index 2702f1696f8937d3319f6fdf5741a441056532d1..b51f48f53375e18e014cce92f2e81fba6db68def 100755 (executable)
@@ -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 <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >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
index 1db3c0b157b7ef38d2b5f544470cbc35758c1d40..cff1a52022543611d70894c9d0c081e861858d99 100755 (executable)
@@ -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 <<END_OF_DATA 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA >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 <<END_OF_DATA 2>&1 >/dev/null
 #bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+@$out /dev/null
 messages
-@output tmp/log2.out
+@$out tmp/log2.out
 @# 
 @# now do a restore
 @#
@@ -62,7 +77,7 @@ restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores select al
 yes
 wait
 messages
-@output
+@$out
 quit
 END_OF_DATA
 scripts/check_for_zombie_jobs storage=File1
index 785f46145f2e9815943b02df0f93bccee3409f87..e2bf556beefc4c97e30f32c07db12eb883d8cbab 100755 (executable)
@@ -6,6 +6,13 @@
 #   the other volume is not used.  I.e. bsr optimization
 #   works.
 #
+debug=0
+if test "$debug" -eq 1 ; then
+  out="tee"
+else
+  out="output"
+fi
+
 cwd=`pwd`
 scripts/copy-test-confs
 scripts/cleanup
@@ -17,12 +24,10 @@ echo " === Starting bsr-opt-test at `date +%R:%S` ==="
 echo " === Starting bsr-opt-test at `date +%R:%S` ===" >working/log
 echo " "
 
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-# bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA >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
 #
index fda085da7f86d5dd0fb698c2e826ca8033ed17e1..9dd157abc2bffd9040e8c512c23bcd3edb61d58d 100755 (executable)
@@ -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 <<END_OF_DATA 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA >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