]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/setup
Updates
[bacula/bacula] / regress / scripts / setup
index e6d4c552f53784eadaae9680dabfdfbe13714c0e..66b3634aca69f8aff4fe042e56fc647f8eeb9c0d 100755 (executable)
@@ -3,8 +3,9 @@
 # Script to setup running Bacula regression tests
 #
 cwd=`pwd`
-if [ $# != 1 ] ; then
-   echo "Arg 1 must be a Bacula release directory."
+if [ $# != 5 ] ; then
+   echo "Incorrect number of arguments. Got $#. Need:"
+   echo "setup bacula-src email-address --with-DBNAME --with-tcp-wrappers"
    echo " "
    exit 1
 fi
@@ -13,30 +14,31 @@ if [ ! -d $1 ] ; then
    echo " "
    exit 1
 fi
-if [ ! -d ../depkgs ] ; then
-   cd ..
-   cwd=`pwd`
-   echo "The regression scripts require ${cwd}/depkgs but not found!" 
-   echo " "
-   exit 1
-fi
 rm -rf build bin
+# Copy new source
+echo "Copying source from $1"
 cp -rp $1 build
 cp scripts/regress-config build
 cd build
-./regress-config ${cwd}
+rm -f Makefile config.cache
+# Run Bacula configuration, make, install
+./regress-config ${cwd} $2 $3 $4 $5
 make
 make install
 cp src/tools/testls ../bin
 
 cd ..
 bin/bacula stop
-bin/create_sqlite_database
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
+cd bin
+./create_bacula_database
+./drop_bacula_tables
+./make_bacula_tables
+./grant_bacula_privileges
+cd ..
+# Start and stop Bacula to ensure conf files are OK
 bin/bacula start
 bin/bacula stop
 #
 # Save Bacula default conf files for later use
 #
-scripts/do_sed
+cp -f bin/*.conf scripts