]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix initial SQlite Problem
authorKern Sibbald <kern@sibbald.com>
Sat, 7 Oct 2006 13:23:41 +0000 (13:23 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 7 Oct 2006 13:23:41 +0000 (13:23 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3537 91ce42f0-d328-0410-95d8-f526ca767f89

regress/README
regress/all-non-root-tape-tests
regress/scripts/setup

index f1ac81f6a176c01963ceb48b12cac5205046fa51..040f87fc11a1878d5bf8e9646c453a81fe8da620 100644 (file)
@@ -24,6 +24,11 @@ email address!
 If you are using SQLite, make sure that depkgs is pre-built if it
 isn't already: (cd your-depkgs; make sqlite).
 
+Note, if you use any database other than SQLite, be sure it is not              
+your production database because Bacula will delete all the tables
+and recreate them.  With SQLite, a new different database is created,
+so it will not affect your production system.
+
 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
@@ -55,10 +60,22 @@ You can run all the disk based tests by doing:
 
   ./do_file
 
+The disk based tests are totally separate from any production
+system, provided you have configured the database appropriately     
+as noted above.
+
 You can run all the disk and most of the tape tests by doing:
 
   ./do_all
 
+======== Important !!! ============
+When running the tape tests, Bacula will write on any tape that
+is in the tape drive that you have configured.  If it is a production
+Bacula tape, it will be destroyed.  If you have configured an Autochanger,
+Bacula will write on the tapes in slots 1 and 2 thus destroying any
+information on those tapes, even if they are Bacula production tapes.
+=================================== 
+
 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.
index 1adf56d1e8f9a933ddbe0fdfeb1cdb9f8808a9e7..6c42add762058f9fb40fb67a34535bdf56d55016 100755 (executable)
@@ -20,7 +20,7 @@ tests/small-file-size-tape
 tests/truncate-bug-tape
 tests/two-pool-tape
 tests/2drive-incremental-2tape
-#tests/bscan-tape
+tests/bscan-tape
 echo " "
 echo " "
 echo "Test results"
index 8b15d75c62be8f4a5539a950edb2aa65e442027b..3ab7ce3dc5f0ce5a870fda0445d9870f309942fc 100755 (executable)
@@ -2,6 +2,15 @@
 #
 # Script to setup running Bacula regression tests
 #
+
+check_exit_code()
+{
+   if [ $? != 0 ] ; then
+      echo "Bad exit code giving up"
+      exit 1 
+   fi
+}
+
 cwd=`pwd`
 if [ $# != 6 ] ; then
    echo "Incorrect number of arguments. Got $#. Need:"
@@ -23,18 +32,25 @@ cd build
 rm -f Makefile config.cache
 # Run Bacula configuration, make, install
 ./regress-config ${cwd} $2 $3 $4 $5 $6
+check_exit_code
 make
+check_exit_code
 make install
+check_exit_code
 cp src/tools/testls ../bin
+check_exit_code
 
-cd ..
+cd ${cwd}
 bin/bacula stop
+
+mkdir -p working
 cd bin
+echo "Running database creation scripts"
 ./create_bacula_database bacula
 ./drop_bacula_tables bacula
-./make_bacula_tables bacula
+./make_bacula_tables
 ./grant_bacula_privileges bacula
-cd ..
+cd ${cwd}
 # Start and stop Bacula to ensure conf files are OK
 bin/bacula start
 bin/bacula stop