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
./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.
#
# 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:"
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