From: Kern Sibbald Date: Sat, 7 Oct 2006 13:23:41 +0000 (+0000) Subject: Fix initial SQlite Problem X-Git-Tag: Release-7.0.0~7496 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8609a9bd3c991ed62dc7da9343524ff5a706c7a0;p=bacula%2Fbacula Fix initial SQlite Problem git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3537 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/README b/regress/README index f1ac81f6a1..040f87fc11 100644 --- a/regress/README +++ b/regress/README @@ -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. diff --git a/regress/all-non-root-tape-tests b/regress/all-non-root-tape-tests index 1adf56d1e8..6c42add762 100755 --- a/regress/all-non-root-tape-tests +++ b/regress/all-non-root-tape-tests @@ -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" diff --git a/regress/scripts/setup b/regress/scripts/setup index 8b15d75c62..3ab7ce3dc5 100755 --- a/regress/scripts/setup +++ b/regress/scripts/setup @@ -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