From 944e26e263775cfe5c423032ea4b841b93d6af69 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 2 May 2008 13:05:18 +0000 Subject: [PATCH] Upgrades git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6873 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/experimental-all | 6 ++++++ regress/experimental-disk | 6 ++++++ regress/experimental-disk-and-tape | 6 ++++++ regress/experimental-tape | 6 ++++++ regress/nightly-all | 6 ++++++ regress/nightly-disk | 6 ++++++ regress/nightly-disk-and-tape | 6 ++++++ regress/nightly-tape | 6 ++++++ regress/prototype.conf | 11 ++++++++++ regress/scripts/bacula-dir-2d.conf.in | 1 + regress/scripts/bacula-dir-win32-tape.conf.in | 17 ++++++++-------- regress/scripts/create_sed | 6 +++++- regress/scripts/functions | 15 ++++++++++++++ regress/scripts/win32-bacula-dir-tape.conf.in | 20 +++++++++---------- regress/scripts/win32-bacula-sd-tape.conf.in | 8 ++++---- regress/tests/accurate-test | 4 +++- regress/tests/bscan-fast-tape | 5 ++++- regress/tests/bscan-tape | 9 +++++++-- regress/tests/bscan-test | 8 ++++++-- 19 files changed, 123 insertions(+), 29 deletions(-) diff --git a/regress/experimental-all b/regress/experimental-all index 079d8901e8..ab5820c428 100755 --- a/regress/experimental-all +++ b/regress/experimental-all @@ -12,5 +12,11 @@ nice ctest -D Experimental -R "^(disk|tape|changer):" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D ExperimentalSubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D ExperimentalSubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/experimental-disk b/regress/experimental-disk index 21852a6ba7..806e653cd6 100755 --- a/regress/experimental-disk +++ b/regress/experimental-disk @@ -12,5 +12,11 @@ nice ctest -D Experimental -R "^disk:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D ExperimentalSubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D ExperimentalSubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/experimental-disk-and-tape b/regress/experimental-disk-and-tape index cbe537639b..3d12671185 100755 --- a/regress/experimental-disk-and-tape +++ b/regress/experimental-disk-and-tape @@ -12,5 +12,11 @@ nice ctest -D Experimental -R "^(disk|tape):" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D ExperimentalSubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D ExperimentalSubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/experimental-tape b/regress/experimental-tape index b847d76f44..0f000f0d3d 100755 --- a/regress/experimental-tape +++ b/regress/experimental-tape @@ -12,5 +12,11 @@ nice ctest -D Experimental -R "^tape:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D ExperimentalSubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D ExperimentalSubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-all b/regress/nightly-all index ac3896529c..868bc10580 100755 --- a/regress/nightly-all +++ b/regress/nightly-all @@ -12,5 +12,11 @@ nice ctest -D Nightly -R "^(disk|tape|changer):" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D NightlySubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D NightlySubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-disk b/regress/nightly-disk index a353630cb5..c0b677ba36 100755 --- a/regress/nightly-disk +++ b/regress/nightly-disk @@ -12,5 +12,11 @@ nice ctest -D Nightly -R "^disk:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D NightlySubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D NightlySubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-disk-and-tape b/regress/nightly-disk-and-tape index cbe537639b..13ce713988 100755 --- a/regress/nightly-disk-and-tape +++ b/regress/nightly-disk-and-tape @@ -12,5 +12,11 @@ nice ctest -D Experimental -R "^(disk|tape):" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D ExperimentalSubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D NightlySubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-tape b/regress/nightly-tape index a4ccf26f2e..37b7195a86 100755 --- a/regress/nightly-tape +++ b/regress/nightly-tape @@ -12,5 +12,11 @@ nice ctest -D Nightly -R "^tape:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D NightlySubmit + if [ $? != 0 ] ; then + echo "Submit failed, waiting 5 mins" + sleep 300 + echo "ctest failed re-running Submit a second time" + ctest -D NightlySubmit + fi fi REGRESS_DEBUG=${save_debug} diff --git a/regress/prototype.conf b/regress/prototype.conf index f4f0ebe948..b91f778898 100644 --- a/regress/prototype.conf +++ b/regress/prototype.conf @@ -76,3 +76,14 @@ BASEPORT=8101 # test machines, add some indication of the machine. # SITE_NAME=-bacula-${HOST} + +# +# The following are used only if you want to run Win32 tests, which +# is a real pain since the Win32 machine is not localhost and you +# also need to specify what to backup. +# +WIN32_CLIENT="yyyy" +WIN32_ADDR="yyyy" +WIN32_FILE="c:/users/xxxx" +WIN32_PORT=9102 +WIN32_PASSWORD="zzzzz" diff --git a/regress/scripts/bacula-dir-2d.conf.in b/regress/scripts/bacula-dir-2d.conf.in index 67c0b0f97e..0fee4369db 100644 --- a/regress/scripts/bacula-dir-2d.conf.in +++ b/regress/scripts/bacula-dir-2d.conf.in @@ -113,6 +113,7 @@ Storage { # Generic catalog service Catalog { Name = MyCatalog + @libdbi@ dbname = regress; user = regress; password = "" } diff --git a/regress/scripts/bacula-dir-win32-tape.conf.in b/regress/scripts/bacula-dir-win32-tape.conf.in index 551ededd9e..f4d572ef6b 100644 --- a/regress/scripts/bacula-dir-win32-tape.conf.in +++ b/regress/scripts/bacula-dir-win32-tape.conf.in @@ -29,7 +29,7 @@ Director { # define myself Job { Name = "NightlySave" Type = Backup - Client=Tibs + Client=@win32_client@ FileSet="Full Set" Storage = DDS-4 Messages = Standard @@ -44,7 +44,7 @@ Job { Job { Name = "RestoreFiles" Type = Restore - Client=Tibs + Client=@win32_client@ FileSet="Full Set" Storage = DDS-4 Messages = Standard @@ -58,7 +58,7 @@ FileSet { Name = "Full Set" Enable VSS = yes Include { Options { signature=MD5 } - File = "c:" + File = "@win32_file@" } } @@ -76,11 +76,11 @@ Schedule { # Client (File Services) to backup Client { - Name = Tibs - Address = tibs - FDPort = 9102 + Name = @win32_client@ + Address = @win32_addr@ + FDPort = @win32_port@ Catalog = MyCatalog - Password = "xBzFq+a9llZyGyfMaNO9e3outP86/1AUAT8P34RoT62G" + Password = "@win32_password@" File Retention = 30d # 30 days Job Retention = 180d # six months AutoPrune = yes # Prune expired Jobs/Files @@ -90,7 +90,7 @@ Client { # Definition of DDS tape storage device Storage { Name = DDS-4 - Address = 192.168.68.112 # N.B. Use a fully qualified name here + Address = @hostname@-sd # N.B. Use a fully qualified name here SDPort = @sdport@ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon Device = DDS-4 # must be same as Device in Storage daemon @@ -103,6 +103,7 @@ Storage { # Generic catalog service Catalog { Name = MyCatalog + @libdbi@ dbname = regress; user = regress; password = "" } diff --git a/regress/scripts/create_sed b/regress/scripts/create_sed index e09ae5e4b8..11ba5ff81e 100755 --- a/regress/scripts/create_sed +++ b/regress/scripts/create_sed @@ -58,4 +58,8 @@ echo "s%@os@%${os}%g" >>${out} echo "s%@bversion@%${bversion}%g" >>${out} echo "s%@bdate@%${bdate}%g" >>${out} echo "s%@libdbi@%${libdbi}%g" >>${out} - +echo "s%@win32_client@%${WIN32_CLIENT}%g" >>${out} +echo "s%@win32_addr@%${WIN32_ADDR}%g" >>${out} +echo "s%@win32_file@%${WIN32_FILE}%g" >>${out} +echo "s%@win32_port@%${WIN32_PORT}%g" >>${out} +echo "s%@win32_password@%${WIN32_PASSWORD}%g" >>${out} diff --git a/regress/scripts/functions b/regress/scripts/functions index ec5d4d3667..7a29bc48a1 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -123,6 +123,21 @@ run_bscan() fi } +bscan_libdbi() +{ + B=`echo $LIBDBI | sed 's/;//' | sed 's/;//g'` + B_D=`echo $B | awk '{print $3}'` + B_t=`echo $B | awk '{print $6}'` + B_p=`echo $B | awk '{print $9}'` + + BSCANLIBDBI="${LIBDBI:+1}" + + if test "$BSCANLIBDBI" -eq "1" ; then + BSCANLIBDBI="-D $B_D -h $B_t -t $B_p" + else + BSCANLIBDBI=" " + fi +} stop_bacula() { diff --git a/regress/scripts/win32-bacula-dir-tape.conf.in b/regress/scripts/win32-bacula-dir-tape.conf.in index cce636551a..00a9364bb4 100644 --- a/regress/scripts/win32-bacula-dir-tape.conf.in +++ b/regress/scripts/win32-bacula-dir-tape.conf.in @@ -13,7 +13,7 @@ # Director { # define myself - Name = localhost-dir + Name = @hostname@-dir DIRPort = @dirport@ # where we listen for UA connections QueryFile = "@scriptdir@/query.sql" WorkingDirectory = "@working_dir@" @@ -29,7 +29,7 @@ Director { # define myself Job { Name = "NightlySave" Type = Backup - Client=Tibs + Client=@win32_client@ FileSet="Full Set" Storage = DDS-4 Messages = Standard @@ -44,7 +44,7 @@ Job { Job { Name = "RestoreFiles" Type = Restore - Client=Tibs + Client=@win32_client@ FileSet="Full Set" Storage = DDS-4 Messages = Standard @@ -59,8 +59,7 @@ FileSet { Enable VSS = yes Include { Options { signature=MD5; portable=no compression=GZIP } -# File = "c:/cygwin" # big - File = "c:/cygwin/home/kern/bacula/k" + File = "@win32_file@" } } @@ -78,11 +77,11 @@ Schedule { # Client (File Services) to backup Client { - Name = Tibs - Address = tibs - FDPort = 9102 + Name = @win32_client@ + Address = @win32_addr@ + FDPort = @win32_port@ Catalog = MyCatalog - Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" + Password = "@win32_password@" File Retention = 30d # 30 days Job Retention = 180d # six months AutoPrune = yes # Prune expired Jobs/Files @@ -105,7 +104,7 @@ Client { # Definition of DDS tape storage device Storage { Name = DDS-4 - Address = 192.168.68.112 # N.B. Use a fully qualified name here + Address = @hostname@-sd # N.B. Use a fully qualified name here SDPort = @sdport@ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" # password for Storage daemon Device = DDS-4 # must be same as Device in Storage daemon @@ -118,6 +117,7 @@ Storage { # Generic catalog service Catalog { Name = MyCatalog + @libdbi@ dbname = regress; user = regress; password = "" } diff --git a/regress/scripts/win32-bacula-sd-tape.conf.in b/regress/scripts/win32-bacula-sd-tape.conf.in index 638b402cd8..759b65c799 100644 --- a/regress/scripts/win32-bacula-sd-tape.conf.in +++ b/regress/scripts/win32-bacula-sd-tape.conf.in @@ -11,7 +11,7 @@ # Storage { # definition of myself - Name = localhost-sd + Name = @hostname@-sd SDPort = 8103 # Director's port WorkingDirectory = "/home/kern/bacula/regress/working" Pid Directory = "/home/kern/bacula/regress/working" @@ -22,7 +22,7 @@ Storage { # definition of myself # List Directors who are permitted to contact Storage daemon # Director { - Name = localhost-dir + Name = @hostname@-dir Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" } @@ -35,11 +35,11 @@ Director { Device { Name = DDS-4 # Media Type = DDS-4 - Archive Device = /dev/nst0 + Archive Device = @tape_drive@ AutomaticMount = yes; # when device opened, read it AlwaysOpen = yes; RemovableMedia = yes; - @/home/kern/bacula/regress/bin/tape_options + @@sbindir@/tape_options # Maximum File Size = 1000000 # MaximumVolumeSize = 100M } diff --git a/regress/tests/accurate-test b/regress/tests/accurate-test index 95c30a587c..cfa545590e 100755 --- a/regress/tests/accurate-test +++ b/regress/tests/accurate-test @@ -267,7 +267,9 @@ cd .. echo "volume=TestVolume001" >tmp/bscan.bsr -${cwd}/bin/bscan -c ${cwd}/bin/bacula-sd.conf -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log +bscan_libdbi + +${cwd}/bin/bscan -c ${cwd}/bin/bacula-sd.conf $BSCANLIBDBI -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log cat <${cwd}/tmp/bconcmds @$out ${cwd}/tmp/log1.out diff --git a/regress/tests/bscan-fast-tape b/regress/tests/bscan-fast-tape index 110c007f7d..a6ba184c53 100755 --- a/regress/tests/bscan-fast-tape +++ b/regress/tests/bscan-fast-tape @@ -63,7 +63,10 @@ cd .. echo "Begin attempt to read tape that crashes the system" echo "volume=TestVolume001" >tmp/bscan.bsr -strace -o strace.new bin/bscan -d200 -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 + +bscan_libdbi + +strace -o strace.new bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 exit cat <tmp/bconcmds @$out /dev/null diff --git a/regress/tests/bscan-tape b/regress/tests/bscan-tape index 71341697e4..0982d89d00 100755 --- a/regress/tests/bscan-tape +++ b/regress/tests/bscan-tape @@ -95,12 +95,17 @@ cd bin cd .. echo "volume=TestVolume001" >tmp/bscan.bsr + +bscan_libdbi + 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 regress -n regress -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 regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null fi +echo $BSCANLIBDBI + cat <tmp/bconcmds @$out /dev/null messages diff --git a/regress/tests/bscan-test b/regress/tests/bscan-test index fd71ef336d..9a158974f9 100755 --- a/regress/tests/bscan-test +++ b/regress/tests/bscan-test @@ -57,12 +57,16 @@ stop_bacula echo "volume=TestVolume001" >tmp/bscan.bsr echo "volume=TestVolume002" >>tmp/bscan.bsr +bscan_libdbi + 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 ${cwd}/tmp + bin/bscan -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp else - bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >tmp/log3.out + bin/bscan -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >tmp/log3.out fi + + cat <tmp/bconcmds @$out /dev/null messages -- 2.39.5