]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/setup
- Take Dan's fix to the fix_postgresql_tables (thanks Dan)
[bacula/bacula] / regress / scripts / setup
1 #!/bin/sh
2 #
3 # Script to setup running Bacula regression tests
4 #
5 cwd=`pwd`
6 if [ $# != 4 ] ; then
7    echo "Incorrect number of arguments. Got $#. Need:"
8    echo "setup bacula-src email-address --with-DBNAME --with-tcp-wrappers"
9    echo " "
10    exit 1
11 fi
12 if [ ! -d $1 ] ; then
13    echo "Arg 1 must be a Bacula release directory."
14    echo " "
15    exit 1
16 fi
17 rm -rf build bin
18 # Copy new source
19 echo "Copying source from $1"
20 cp -rp $1 build
21 cp scripts/regress-config build
22 cd build
23 rm -f Makefile config.cache
24 # Run Bacula configuration, make, install
25 ./regress-config ${cwd} $2 $3 $4
26 make
27 make install
28 cp src/tools/testls ../bin
29
30 cd ..
31 bin/bacula stop
32 cd bin
33 ./create_bacula_database
34 ./drop_bacula_tables
35 ./make_bacula_tables
36 ./grant_bacula_privileges
37 cd ..
38 # Start and stop Bacula to ensure conf files are OK
39 bin/bacula start
40 bin/bacula stop
41 #
42 # Save Bacula default conf files for later use
43 #
44 cp -f bin/*.conf scripts