]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/setup
- Implemented Preben 'Peppe' Guldberg <peppe@wielders.org>
[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 # Remove files that may be too big
25 cd doc/latex
26 make clean
27 cd ../..
28 # Run Bacula configuration, make, install
29 ./regress-config ${cwd} $2 $3 $4
30 make
31 make install
32 cp src/tools/testls ../bin
33
34 cd ..
35 bin/bacula stop
36 cd bin
37 ./create_bacula_database
38 ./drop_bacula_tables
39 ./make_bacula_tables
40 ./grant_bacula_privileges
41 cd ..
42 # Start and stop Bacula to ensure conf files are OK
43 bin/bacula start
44 bin/bacula stop
45 #
46 # Save Bacula default conf files for later use
47 #
48 cp -f bin/*.conf scripts