3 # Run tests using differents catalog databases
7 CATALOG_MODE="postgresql postgresql-batchinsert postgresql-dbi postgresql-dbi-batchinsert \
8 mysql mysql-batchinsert mysql-dbi mysql-dbi-batchinsert"
10 for CT in $CATALOG_MODE ; do
12 CATALOG=`echo $CT | cut -d"-" -f1`
13 DISABLE_BATCH_INSERT=`echo $CT | grep batchinsert`
14 WITHOUT_DBI=`echo $CT | grep dbi`
16 if test "$DISABLE_BATCH_INSERT" = "" ; then
17 ENABLE_BATCH_INSERT="--disable-batch-insert"
19 ENABLE_BATCH_INSERT="--enable-batch-insert"
22 if test "$WITHOUT_DBI" = "" ; then
24 _WHICHDB="WHICHDB=\"--disable-nls --with-${CATALOG} ${ENABLE_BATCH_INSERT}\""
27 if test "$CATALOG" = "mysql" ; then
33 _WHICHDB="WHICHDB=\"--disable-nls --with-dbi --with-dbi-driver=${CATALOG} ${ENABLE_BATCH_INSERT} --with-db-port=${DBPORT}\""
34 _LIBDBI="LIBDBI=\"dbdriver = dbi:${CATALOG}; dbaddress = 127.0.0.1; dbport = ${DBPORT}\""
38 _SITE_NAME="SITE_NAME=joaohf-bacula-${CT}"
40 # subustitute config values
41 cp -a ${PWD}/config ${PWD}/config.tmp
45 echo "/^SITE_NAME/c $_SITE_NAME" >> tmp/config_sed
46 echo "/^WHICHDB/c $_WHICHDB" >> tmp/config_sed
47 echo "/^#LIBDBI/c $_LIBDBI" >> tmp/config_sed
48 echo "/^LIBDBI/c $_LIBDBI" >> tmp/config_sed
50 sed -f tmp/config_sed ${PWD}/config.tmp > ${PWD}/config
55 echo " ==== Submiting ${_SITE_NAME} ====" >> test.out