]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/setup
Extend idea of Prefer Mounted Volumes to mean a volume about
[bacula/bacula] / regress / scripts / setup
index 8b15d75c62be8f4a5539a950edb2aa65e442027b..9b592f6664ef357a560c6aea79426ea9647e3379 100755 (executable)
@@ -2,6 +2,15 @@
 #
 # 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:"
@@ -23,18 +32,29 @@ cd build
 rm -f Makefile config.cache
 # Run Bacula configuration, make, install
 ./regress-config ${cwd} $2 $3 $4 $5 $6
+check_exit_code
+# Cleanup any win32 build in source
+cd src/win32
+make clean
+cd ../..
 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