From: Kern Sibbald Date: Tue, 10 Jan 2006 08:44:29 +0000 (+0000) Subject: Updates X-Git-Tag: Release-1.38.4~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ecedf2376488a1afb2551355f1e3c545d66cedb7;p=bacula%2Fbacula Updates git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2734 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/all-non-root-tape-tests b/regress/all-non-root-tape-tests index 99e6e9164e..79870318e2 100755 --- a/regress/all-non-root-tape-tests +++ b/regress/all-non-root-tape-tests @@ -2,6 +2,10 @@ # # Run all tape tests # +. config.out +if test ! x$AUTOCHANGER = x/dev/null ; then + mtx -f $AUTOCHANGER load 1 >/dev/null &2>/dev/null +fi cp test.out test1.out tests/test0 tests/backup-bacula-tape diff --git a/regress/scripts/test-bacula-dir.conf.in b/regress/scripts/test-bacula-dir.conf.in index 9752660b25..4283c9fff3 100644 --- a/regress/scripts/test-bacula-dir.conf.in +++ b/regress/scripts/test-bacula-dir.conf.in @@ -86,6 +86,7 @@ Job { Pool = Default Maximum Concurrent Jobs = 4 Write Bootstrap = "@working_dir@/NightlySave.bsr" +# Max Run Time = 15 seconds } Job { diff --git a/regress/tests/four-jobs-test b/regress/tests/four-jobs-test index ec9eb53648..828cc7cc04 100755 --- a/regress/tests/four-jobs-test +++ b/regress/tests/four-jobs-test @@ -4,6 +4,13 @@ # then backup four times, each with incremental then finally restore. # It should require at least 4 different bsrs. # +debug=0 +if test "$debug" -eq 1 ; then + out="tee" +else + out="output" +fi + cwd=`pwd` scripts/copy-test-confs scripts/cleanup @@ -15,20 +22,28 @@ echo " === Starting four-jobs-test at `date +%R:%S` ===" echo " === Starting four-jobs-test at `date +%R:%S` ===" >>working/log echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +cat <tmp/bconcmds @output /dev/null estimate job=CompressedTest listing estimate job=CompressedTest listing estimate job=CompressedTest listing messages -@output tmp/log1.out +@$out tmp/log1.out label storage=File volume=TestVolume001 run job=CompressedTest yes wait 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=File echo "Backup 1 done" # make some files for the incremental to pick up @@ -38,16 +53,23 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a second job # -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +cat <tmp/bconcmds @output /dev/null messages -@output tmp/log1.out +@$out tmp/log1.out run job=CompressedTest yes wait messages quit END_OF_DATA + +if test "$debug" -eq 1 ; then + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File echo "Backup 2 done" touch ${cwd}/build/src/dird/*.c @@ -55,7 +77,7 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a third job # -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +cat <tmp/bconcmds @output /dev/null messages @output tmp/log1.out @@ -65,6 +87,13 @@ wait messages quit END_OF_DATA + +if test "$debug" -eq 1 ; then + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File echo "Backup 3 done" # make some files for the incremental to pick up @@ -72,7 +101,7 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a fourth job # -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +cat <tmp/bconcmds @output /dev/null messages @output tmp/log1.out @@ -82,12 +111,19 @@ wait messages quit END_OF_DATA + +if test "$debug" -eq 1 ; then + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + scripts/check_for_zombie_jobs storage=File echo "Backup 4 done" # # now do several restores to ensure we cleanup between jobs # -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +cat <tmp/bconcmds @output /dev/null restore where=${cwd}/tmp/bacula-restores select all storage=File done yes @@ -95,7 +131,7 @@ wait restore where=${cwd}/tmp/bacula-restores select all storage=File done yes wait -@output tmp/log2.out +@$out tmp/log2.out restore where=${cwd}/tmp/bacula-restores select storage=File unmark * mark * @@ -106,6 +142,13 @@ messages @output quit END_OF_DATA + +if test "$debug" -eq 1 ; then + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + 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 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null