From: Kern Sibbald Date: Sat, 19 Nov 2005 11:39:39 +0000 (+0000) Subject: Update X-Git-Tag: Release-7.0.0~8277 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;ds=sidebyside;h=06171e1b127354916b1d74f8a625aa4477462ad5;p=bacula%2Fbacula Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2595 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/README b/regress/README index 96b9ce57e9..7a8f2fed98 100644 --- a/regress/README +++ b/regress/README @@ -14,6 +14,12 @@ email address! Make sure that depkgs is pre-built if it isn't already: (cd your-depkgs; make sqlite). +Using the .conf file, you can now select between any Catalog type: +SQLite, SQLite3, MySQL, or PostgreSQL. Be aware, however, if you +use an installed database on a production server, running these +tests will delete all the tables !!!!!!!!!!!!!!!!!! I run my +tests on a non-production machine, and in addition, I normally use +SQLite as the database, while my production uses MySQL. Then do: @@ -34,7 +40,8 @@ self-initalizing and should clean up after itself. Not all the tests yet report OK. This is simply because there are some spurious differences that I haven't yet taken the time to -eliminate. The working scrips as of 24 Apr 03 are: +eliminate. The working scrips as of 24 Apr 03 are (this is +way out of date!): backup-bacula-test sparse-test @@ -47,6 +54,18 @@ verify-vol-test The tests expect you to execute them from the main regress directory! +You can run all the disk based tests by doing: + + ./do_file + +You can run all the disk and most of the tape tests by doing: + + ./do_all + +Each of the above calls one or more scripts. By looking at the +scripts available in this directory, you can see that there are a number +of options for running tests. + You can run them individually as: tests/two-jobs-test @@ -83,16 +102,6 @@ conf files, and you do not need a new copy of the source, you can simply do: Debugging failed tests: The simplest thing to do is to edit tests/xxxx where xxxx is the name of -a or the test that is failing and change all: - - @output - -to - - @tee - -re-run the test. The output will display on your terminal. In rare cases, -for example to get bacula debug output, you might want to remove the -"2>&1 >/dev/null" from the end of the bin/bacula call or from the end -of the diff call, assuming you want to "see" the diff output. - +the test, and change the line "debug=0" to "debug=1". If the test has +not been updated to have the debug variable, please notify Kern, and I +will be happy to fix it -- I am upgrading them one at a time. diff --git a/regress/kern.conf b/regress/kern.conf index e497babd4c..b50b77d6d9 100644 --- a/regress/kern.conf +++ b/regress/kern.conf @@ -1,5 +1,5 @@ # Where to get the source to be tested -# BACULA_SOURCE="${HOME}/bacula/branch-1.36.2" +# BACULA_SOURCE="${HOME}/bacula/branch-1.38.1" BACULA_SOURCE="${HOME}/bacula/k" # Where to send email !!!!! Change me !!!!!!! @@ -20,9 +20,10 @@ TAPE_DRIVE1="/dev/nst1" AUTOCHANGER_PATH="/usr/sbin/mtx" # Set your database here -#SQLITE_DIR=${HOME}/bacula/depkgs/sqlite3 WHICHDB?="--with-sqlite=${SQLITE_DIR}" #WHICHDB="--with-mysql=${HOME}/mysql" +#WHICHDB="--with-postgresql" # Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" TCPWRAPPERS="--with-tcp-wrappers" + diff --git a/regress/scripts/.cvsignore b/regress/scripts/.cvsignore index 306c3a6c70..1b72890398 100644 --- a/regress/scripts/.cvsignore +++ b/regress/scripts/.cvsignore @@ -20,3 +20,4 @@ bacula-sd-2drive.conf bacula-sd-win32-tape.conf bacula-sd-2drive.conf bacula-dir-win32-tape.conf +win32-bacula-dir-tape.conf diff --git a/regress/scripts/win32-bacula-fd.conf b/regress/scripts/win32-bacula-fd.conf new file mode 100644 index 0000000000..115b83d0e7 --- /dev/null +++ b/regress/scripts/win32-bacula-fd.conf @@ -0,0 +1,33 @@ +# +# Default Bacula File Daemon Configuration file +# +# For Bacula release 1.33 +# +# There is not much to change here except perhaps the +# File daemon Name to +# + +# +# List Directors who are permitted to contact this File daemon +# +Director { + Name = rufus-dir + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" +} + +# +# "Global" File daemon configuration specifications +# +FileDaemon { # this is me + Name = localhost-fd + FDport = 8102 # where we listen for the director + WorkingDirectory = "/home/kern/bacula/regress/working" + Pid Directory = "/home/kern/bacula/regress/working" + SubSys Directory = "/home/kern/bacula/regress/working" +} + +# Send all messages except skipped files back to Director +Messages { + Name = Standard + director = rufus-dir = all, !terminate +} diff --git a/regress/tests/win32-to-linux-tape b/regress/tests/win32-to-linux-tape new file mode 100755 index 0000000000..7cced61b81 --- /dev/null +++ b/regress/tests/win32-to-linux-tape @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory +# to a tape then restore it, we do that twice to ensure that +# we can correctly append to a tape. +# +debug=1 +if test "$debug" -eq 1 ; then + out="tee" +else + out="output" +fi + +cwd=`pwd` +scripts/copy-win32-confs +scripts/cleanup-tape + +echo "${cwd}/build" >/tmp/file-list + +echo " " +echo " " +echo " === Starting Win32 Backup tape test at `date +%R:%S` ===" +echo " === Starting Win32 Backup tape test at `date +%R:%S` ===" >>working/log +echo " " + +cat <tmp/bconcmds +@output /dev/null +messages +@$out tmp/log1.out +label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default drive=0 +run job=NightlySave yes +@sleep 10 +status storage=DDS-4 +@sleep 30 +messages +wait +messages +@# +@# now do a restore +@# +@$out tmp/log2.out +restore where=c:/tmp/bacula-restores client=Tibs select all storage=DDS-4 done +yes +wait +messages +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=DDS-4 + +bin/bacula stop 2>&1 >/dev/null +grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null +rstat=$? +if [ $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! Win32 Backup tape test failed!!! !!!!! " + echo " !!!!! Win32 Backup tape test failed!!! !!!!! " >>test.out + echo " " +else + echo " ===== Win32 Backup tape test OK ===== " + echo " ===== Win32 Backup tape test OK ===== " >>test.out +# scripts/cleanup +fi