]> git.sur5r.net Git - bacula/bacula/commitdiff
Set tape options also vtape in one place
authorKern Sibbald <kern@sibbald.com>
Sat, 5 Jul 2008 16:24:16 +0000 (16:24 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 5 Jul 2008 16:24:16 +0000 (16:24 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7322 91ce42f0-d328-0410-95d8-f526ca767f89

13 files changed:
regress/scripts/copy-2drive-confs
regress/scripts/copy-2tape-confs
regress/scripts/copy-confs
regress/scripts/copy-fifo-confs
regress/scripts/copy-strip-confs
regress/scripts/copy-tape-confs
regress/scripts/copy-test-confs
regress/scripts/copy-testa-confs
regress/scripts/copy-win32-confs
regress/scripts/do_sed
regress/scripts/set_tape_options [new file with mode: 0755]
regress/scripts/vtape_tape_options [deleted file]
regress/startover_libdbi.sh [new file with mode: 0755]

index 0388c4c1752c7a0ce5450f0c47ac8bf3403b3c0c..cccce99b00cfebd69594742476aee27e93374363 100755 (executable)
@@ -8,8 +8,4 @@ echo "s%# Autochanger = yes%  Autochanger = yes%g" >${outf}
 cp bin/bacula-dir.conf tmp/1
 sed -f ${outf} tmp/1 >bin/bacula-dir.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 26f4f01088859e95ed1c74521fa533454051db0b..73f2eb449344d7a533c56e525850ff8aee2c76c4 100755 (executable)
@@ -8,12 +8,4 @@ echo "s%# Autochanger = yes%  Autochanger = yes%g" >${outf}
 cp bin/bacula-dir.conf tmp/1
 sed -f ${outf} tmp/1 >bin/bacula-dir.conf
 
-# get proper SD tape definitions
-if [ x$USE_VTAPE = xyes ]; then
-    cp -f scripts/vtape_tape_options bin/tape_options
-else
-    cp -f scripts/linux_tape_options bin/tape_options
-fi
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index c12a20a359a81e0f5de970745b87d6bcb46d1376..0bde53e6aa62b25398f7c51631c2015421e280fb 100755 (executable)
@@ -4,8 +4,4 @@
 /bin/cp -f scripts/bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/bconsole.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 812b731967a7af0c766711b463382f86176ec562..7e5dbb5ec91f5eaffecb084f4335b1f21e3861a5 100755 (executable)
@@ -4,8 +4,4 @@
 /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 71a0674538dc4110f59aaa75ede263b6a2ab7211..36b67f8b03261498314b5f7fcd270fbcb150ecd6 100755 (executable)
@@ -4,8 +4,4 @@
 /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index afdf869e49c5288df99651b98d9dabdbbf8b307a..4a312c5ce850ba4969195ac14ee524fcdc433c3e 100755 (executable)
@@ -4,12 +4,4 @@
 /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-if [ x$USE_VTAPE = xyes ]; then
-    cp -f scripts/vtape_tape_options bin/tape_options
-else 
-    cp -f scripts/linux_tape_options bin/tape_options
-fi
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 5552c77116fc09889ff5067b8be6b6864a908fb1..f9749ca1c155d7e1bd082081926b7a759c05cfda 100755 (executable)
@@ -4,8 +4,4 @@
 /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 46116b9f900a9647234c9da082e2f8301dab0f40..b4e2f6b94c33d9f7fac19e22664a66f508662f16 100755 (executable)
@@ -4,8 +4,4 @@
 /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 7cda59aabcf0773095faaa29637171c337470763..e3cc5fd8fc9ce3f046026794e1bf81d8566049d6 100755 (executable)
@@ -4,8 +4,4 @@
 /bin/cp -f scripts/win32-bacula-fd.conf bin/bacula-fd.conf
 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
 
-# get proper SD tape definitions
-cp -f scripts/linux_tape_options bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f scripts/freebsd_tape_options bin/tape_options
-fi
+scripts/set_tape_options
index 0294c98308793110d604245621f90128043a4bd5..49ea8576464e8e9a88fdfd1d3097a69e8293c236 100755 (executable)
@@ -74,11 +74,7 @@ cp ${cwd}/bin/mtx-changer ${cwd}/tmp/bac$$
 sed "s%^MTX.*$%MTX=${AUTOCHANGER_PATH}%g" ${cwd}/tmp/bac$$ >${cwd}/bin/mtx-changer
 chmod 755 ${cwd}/bin/mtx-changer ${cwd}/scripts/prepare-fake-autochanger
 
-# get proper SD tape definitions
-cp -f ${cwd}/scripts/linux_tape_options ${cwd}/bin/tape_options
-if test x`uname` = xFreeBSD ; then
-   cp -f ${cwd}/scripts/freebsd_tape_options ${cwd}/bin/tape_options
-fi
+scripts/set_tape_options
 
 rm -f ${out}
 rm -f ${cwd}/tmp/bac$$
diff --git a/regress/scripts/set_tape_options b/regress/scripts/set_tape_options
new file mode 100755 (executable)
index 0000000..d7970aa
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh 
+. ./config
+# get proper SD tape definitions
+cp -f scripts/linux_tape_options bin/tape_options
+if test x`uname` = xFreeBSD ; then
+   cp -f scripts/freebsd_tape_options bin/tape_options
+fi
+if test x${USE_VTAPE} = xyes ; then
+  echo "  Device Type = vtape" >>bin/tape_options
+fi
diff --git a/regress/scripts/vtape_tape_options b/regress/scripts/vtape_tape_options
deleted file mode 100644 (file)
index 2ac6e47..0000000
+++ /dev/null
@@ -1 +0,0 @@
-DeviceType = Vtape
diff --git a/regress/startover_libdbi.sh b/regress/startover_libdbi.sh
new file mode 100755 (executable)
index 0000000..e37b238
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Run tests using differents catalog databases
+
+PWD=`pwd`
+
+CATALOG_MODE="postgresql postgresql-batchinsert postgresql-dbi postgresql-dbi-batchinsert \
+              mysql mysql-batchinsert mysql-dbi mysql-dbi-batchinsert"
+
+for CT in $CATALOG_MODE ; do
+
+   CATALOG=`echo $CT | cut -d"-" -f1`
+   DISABLE_BATCH_INSERT=`echo $CT | grep batchinsert`
+   WITHOUT_DBI=`echo $CT | grep dbi`
+
+   if test "$DISABLE_BATCH_INSERT" = "" ; then
+      ENABLE_BATCH_INSERT="--disable-batch-insert"
+   else
+      ENABLE_BATCH_INSERT="--enable-batch-insert"
+   fi
+
+   if test "$WITHOUT_DBI" = "" ; then
+
+     _WHICHDB="WHICHDB=\"--disable-nls --with-${CATALOG} ${ENABLE_BATCH_INSERT}\""
+     _LIBDBI="#LIBDBI"
+   else 
+     if test "$CATALOG" = "mysql" ; then
+        DBPORT=3306
+     else
+        DBPORT=5432
+     fi
+
+     _WHICHDB="WHICHDB=\"--disable-nls --with-dbi --with-dbi-driver=${CATALOG} ${ENABLE_BATCH_INSERT} --with-db-port=${DBPORT}\""
+     _LIBDBI="LIBDBI=\"dbdriver = dbi:${CATALOG}; dbaddress = 127.0.0.1; dbport = ${DBPORT}\""
+
+   fi
+
+   _SITE_NAME="SITE_NAME=joaohf-bacula-${CT}"   
+   
+   # subustitute config values
+   cp -a ${PWD}/config ${PWD}/config.tmp
+
+   mkdir -p tmp
+
+   echo "/^SITE_NAME/c $_SITE_NAME" >> tmp/config_sed
+   echo "/^WHICHDB/c $_WHICHDB"  >> tmp/config_sed
+   echo "/^#LIBDBI/c $_LIBDBI" >> tmp/config_sed
+   echo "/^LIBDBI/c $_LIBDBI" >> tmp/config_sed
+
+   sed -f tmp/config_sed ${PWD}/config.tmp > ${PWD}/config
+   rm tmp/config_sed
+
+   make setup
+   ./experimental-disk
+   echo "  ==== Submiting ${_SITE_NAME} ====" >> test.out
+done
+
+
+
+