]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/setup
Fix restore spanning volumes
[bacula/bacula] / regress / scripts / setup
1 #!/bin/sh
2 #
3 # Script to setup running Bacula regression tests
4 #
5 cwd=`pwd`
6 if [ $# != 3 ] ; then
7    echo "Incorrect number of arguments. Need:"
8    echo "setup bacula-src depkgs email-address"
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 if [ ! -d $2 ] ; then
18    cd ..
19    cwd=`pwd`
20    echo "The regression scripts require DEPKGS as arg 2 but not found!" 
21    echo " "
22    exit 1
23 fi
24 rm -rf build bin
25 # Copy new source
26 cp -rp $1 build
27 cp scripts/regress-config build
28 cd build
29 rm -f Makefile config.cache
30 # Run Bacula configuration, make, install
31 ./regress-config ${cwd} $2 $3
32 make
33 make install
34 cp src/tools/testls ../bin
35
36 cd ..
37 bin/bacula stop
38 bin/create_sqlite_database
39 bin/drop_sqlite_tables
40 bin/make_sqlite_tables
41 # Start and stop Bacula to ensure conf files are OK
42 bin/bacula start
43 bin/bacula stop
44 #
45 # Save Bacula default conf files for later use
46 #
47 cp -f bin/*.conf scripts