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}
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}
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}
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}
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}
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}
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}
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}
# test machines, add some indication of the machine.
#
SITE_NAME=<your-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"
# Generic catalog service
Catalog {
Name = MyCatalog
+ @libdbi@
dbname = regress; user = regress; password = ""
}
Job {
Name = "NightlySave"
Type = Backup
- Client=Tibs
+ Client=@win32_client@
FileSet="Full Set"
Storage = DDS-4
Messages = Standard
Job {
Name = "RestoreFiles"
Type = Restore
- Client=Tibs
+ Client=@win32_client@
FileSet="Full Set"
Storage = DDS-4
Messages = Standard
Name = "Full Set"
Enable VSS = yes
Include { Options { signature=MD5 }
- File = "c:"
+ File = "@win32_file@"
}
}
# 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
# 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
# Generic catalog service
Catalog {
Name = MyCatalog
+ @libdbi@
dbname = regress; user = regress; password = ""
}
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}
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()
{
#
Director { # define myself
- Name = localhost-dir
+ Name = @hostname@-dir
DIRPort = @dirport@ # where we listen for UA connections
QueryFile = "@scriptdir@/query.sql"
WorkingDirectory = "@working_dir@"
Job {
Name = "NightlySave"
Type = Backup
- Client=Tibs
+ Client=@win32_client@
FileSet="Full Set"
Storage = DDS-4
Messages = Standard
Job {
Name = "RestoreFiles"
Type = Restore
- Client=Tibs
+ Client=@win32_client@
FileSet="Full Set"
Storage = DDS-4
Messages = Standard
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@"
}
}
# 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
# 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
# Generic catalog service
Catalog {
Name = MyCatalog
+ @libdbi@
dbname = regress; user = regress; password = ""
}
#
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"
# List Directors who are permitted to contact Storage daemon
#
Director {
- Name = localhost-dir
+ Name = @hostname@-dir
Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
}
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
}
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 <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out ${cwd}/tmp/log1.out
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 <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
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 <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
messages
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 <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
messages