3 # Run tests using differents catalog databases
7 CATALOG_MODE="mysql-dbi mysql-dbi-batchinsert"
8 #"postgresql postgresql-batchinsert postgresql-dbi postgresql-dbi-batchinsert \
9 # mysql mysql-batchinsert mysql-dbi mysql-dbi-batchinsert"
11 for CT in $CATALOG_MODE ; do
13 CATALOG=`echo $CT | cut -d"-" -f1`
14 DISABLE_BATCH_INSERT=`echo $CT | grep batchinsert`
15 WITHOUT_DBI=`echo $CT | grep dbi`
17 if test "$DISABLE_BATCH_INSERT" = "" ; then
18 ENABLE_BATCH_INSERT="--disable-batch-insert"
20 ENABLE_BATCH_INSERT="--enable-batch-insert"
23 if test "$WITHOUT_DBI" = "" ; then
25 _WHICHDB="WHICHDB=\"--with-${CATALOG}\""
26 _OPENSSL="OPENSSL=\"--with-openssll --disable-nls ${ENABLE_BATCH_INSERT}\""
29 if test "$CATALOG" = "mysql" ; then
31 elif test "$CATALOG" = "postgresql" ; then
33 elif test "$CATALOG" = "sqlite" ; then
35 elif test "$CATALOG" = "sqlite3" ; then
39 _WHICHDB="WHICHDB=\"--with-dbi\""
40 _OPENSSL="OPENSSL=\"--with-openssl --disable-nls ${ENABLE_BATCH_INSERT} --with-dbi-driver=${CATALOG} --with-db-port=${DBPORT}\""
41 _LIBDBI="LIBDBI=\"dbdriver = dbi:${CATALOG}; dbaddress = 127.0.0.1; dbport = ${DBPORT}\""
44 _SITE_NAME="SITE_NAME=joaohf-bacula-${CT}"
46 # substitute config values
47 cp -a ${PWD}/config ${PWD}/config.tmp
51 echo "/^SITE_NAME/c $_SITE_NAME" >> tmp/config_sed
52 echo "/^WHICHDB/c $_WHICHDB" >> tmp/config_sed
53 echo "/^OPENSSL/c $_OPENSSL" >> tmp/config_sed
54 echo "/^#LIBDBI/c $_LIBDBI" >> tmp/config_sed
55 echo "/^LIBDBI/c $_LIBDBI" >> tmp/config_sed
57 sed -f tmp/config_sed ${PWD}/config.tmp > ${PWD}/config
61 echo " ==== Starting ${_SITE_NAME} ====" >> test.out
63 if test x"$1" = "xctest" ; then
68 echo " ==== Submiting ${_SITE_NAME} ====" >> test.out