]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Sat, 19 Nov 2005 11:39:39 +0000 (11:39 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 19 Nov 2005 11:39:39 +0000 (11:39 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2595 91ce42f0-d328-0410-95d8-f526ca767f89

regress/README
regress/kern.conf
regress/scripts/.cvsignore
regress/scripts/win32-bacula-fd.conf [new file with mode: 0644]
regress/tests/win32-to-linux-tape [new file with mode: 0755]

index 96b9ce57e9192c77c8f1b393ebaf3129d7c5887a..7a8f2fed980d7de061d07a4d21012fcd3fd2b18a 100644 (file)
@@ -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.
index e497babd4c1141663375833f15ccfa20affa5d0e..b50b77d6d96d5d245660926358cea3c98f7e5066 100644 (file)
@@ -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"
+
index 306c3a6c700ad48aa131a58c4eb1b221bf2ac8f4..1b7289039811cf8d59a9d6a031e9b8771a179955 100644 (file)
@@ -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 (file)
index 0000000..115b83d
--- /dev/null
@@ -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 (executable)
index 0000000..7cced61
--- /dev/null
@@ -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 <<END_OF_DATA >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