From: Kern Sibbald Date: Fri, 29 Feb 2008 10:32:27 +0000 (+0000) Subject: Separate Dart configuration X-Git-Tag: Release-7.0.0~4919 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=10dc822c01165b5d9c8d783d3787a0f42821b5dc;p=bacula%2Fbacula Separate Dart configuration git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6523 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/nightly-all b/regress/nightly-all index a709a28e00..fef67ec18a 100755 --- a/regress/nightly-all +++ b/regress/nightly-all @@ -6,6 +6,6 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG -scripts/do_sed +scripts/config_dart ctest -D Nightly -R "all-non-root.*" REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-disk b/regress/nightly-disk index 448ec5481b..28bc47053d 100755 --- a/regress/nightly-disk +++ b/regress/nightly-disk @@ -6,6 +6,6 @@ save_debug=${REGRESS_DEBUG} REGRESS_DEBUG=1 export REGRESS_DEBUG -scripts/do_sed +scripts/config_dart ctest -D Nightly -R "all-non-root:" REGRESS_DEBUG=${save_debug} diff --git a/regress/scripts/config_dart b/regress/scripts/config_dart new file mode 100755 index 0000000000..324915a5dc --- /dev/null +++ b/regress/scripts/config_dart @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Configure the dart files +# +cwd=`pwd` +. ${cwd}/config +mkdir -p ${cwd}/bin +out="${cwd}/tmp/sed_tmp" + +scripts/create_sed + + +sed -f ${out} ${cwd}/DartConfiguration.tcl.in >${cwd}/DartConfiguration.tcl +sed -f ${out} ${cwd}/DartTestfile.txt.in >${cwd}/DartTestfile.txt + +sed -f ${out} ${cwd}/scripts/update-ctest.in >${cwd}/scripts/update-ctest +chmod +x ${cwd}/scripts/update-ctest diff --git a/regress/scripts/create_sed b/regress/scripts/create_sed new file mode 100755 index 0000000000..e66070c3c8 --- /dev/null +++ b/regress/scripts/create_sed @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Create the sed file for configuring everything +# +cwd=`pwd` +. ${cwd}/config +mkdir -p ${cwd}/bin +mkdir -p ${cwd}/tmp +out="${cwd}/tmp/sed_tmp" + +# set the ports used by these tests +BASEPORT=${BASEPORT:-8101} +srcdir=${BACULA_SOURCE} +dirport=${BASEPORT} +fdport=`expr ${BASEPORT} '+' 1` +sdport=`expr ${BASEPORT} '+' 2` +os=`uname -s` +dbengine=`echo ${WHICHDB} | sed -e 's/--with-//' -e 's/=.*//'` +bversion=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` +bdate=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` + +# Create sed command script +echo "s%@sbindir@%${cwd}/bin%g" >${out} +echo "s%@scriptdir@%${cwd}/bin%g" >>${out} +echo "s%@working_dir@%${cwd}/working%g" >>${out} +echo "s%@piddir@%${cwd}/working%g" >>${out} +echo "s%@subsysdir@%${cwd}/working%g" >>${out} +echo "s%@job_email@%${EMAIL}%g" >>${out} +echo "s%@tape_drive@%${TAPE_DRIVE}%g" >>${out} +echo "s%@autochanger@%${AUTOCHANGER}%g" >>${out} +echo "s%@tmpdir@%${cwd}/tmp%g" >>${out} +echo "s%@hostname@%${HOST}%g" >>${out} +echo "s%@changer_path@%${AUTOCHANGER_PATH}%g" >>${out} +echo "s%@tape_drive1@%${TAPE_DRIVE1}%g" >>${out} +echo "s%@smtp_host@%${SMTP_HOST}%g" >>${out} +echo "s%@disk_drive@%${cwd}/tmp/disk-changer%g" >>${out} +echo "s%@hostname@%${hostname}%g" >>${out} +echo "s%@hostname1@%${hostname1}%g" >>${out} +echo "s%@hostname2@%${hostname2}%g" >>${out} +echo "s%@hostname3@%${hostname3}%g" >>${out} +echo "s%@hostname1_files@%${hostname1_files}%g" >>${out} +echo "s%@hostname_files@%${hostname_files}%g" >>${out} +echo "s%@hostname2_files@%${hostname2_files}%g" >>${out} +echo "s%@hostname3_files@%${hostname3_files}%g" >>${out} +echo "s%@hostname1_password@%${hostname1_password}%g" >>${out} +echo "s%@hostname2_password@%${hostname2_password}%g" >>${out} +echo "s%@hostname3_password@%${hostname3_password}%g" >>${out} +echo "s%@dirport@%${dirport}%g" >>${out} +echo "s%@sdport@%${sdport}%g" >>${out} +echo "s%@fdport@%${fdport}%g" >>${out} +echo "s%@regressdir@%${cwd}%g" >>${out} +echo "s%@dbengine@%${dbengine}%g" >>${out} +echo "s%@srcdir@%${srcdir}%g" >>${out} +echo "s%@sitename@%${SITE_NAME}%g" >>${out} +echo "s%@os@%${os}%g" >>${out} +echo "s%@bversion@%${bversion}%g" >>${out} +echo "s%@bdate@%${bdate}%g" >>${out} diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 5bba66be4a..851dfa73c4 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -5,54 +5,7 @@ cwd=`pwd` mkdir -p ${cwd}/bin out="${cwd}/tmp/sed_tmp" -# set the ports used by these tests -BASEPORT=${BASEPORT:-8101} -srcdir=${BACULA_SOURCE} -dirport=${BASEPORT} -fdport=`expr ${BASEPORT} '+' 1` -sdport=`expr ${BASEPORT} '+' 2` -os=`uname -s` -dbengine=`echo ${WHICHDB} | sed -e 's/--with-//' -e 's/=.*//'` -bversion=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` -bdate=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` - -# Create sed command script -echo "s%@sbindir@%${cwd}/bin%g" >${out} -echo "s%@scriptdir@%${cwd}/bin%g" >>${out} -echo "s%@working_dir@%${cwd}/working%g" >>${out} -echo "s%@piddir@%${cwd}/working%g" >>${out} -echo "s%@subsysdir@%${cwd}/working%g" >>${out} -echo "s%@job_email@%${EMAIL}%g" >>${out} -echo "s%@tape_drive@%${TAPE_DRIVE}%g" >>${out} -echo "s%@autochanger@%${AUTOCHANGER}%g" >>${out} -echo "s%@tmpdir@%${cwd}/tmp%g" >>${out} -echo "s%@hostname@%${HOST}%g" >>${out} -echo "s%@changer_path@%${AUTOCHANGER_PATH}%g" >>${out} -echo "s%@tape_drive1@%${TAPE_DRIVE1}%g" >>${out} -echo "s%@smtp_host@%${SMTP_HOST}%g" >>${out} -echo "s%@disk_drive@%${cwd}/tmp/disk-changer%g" >>${out} -echo "s%@hostname@%${hostname}%g" >>${out} -echo "s%@hostname1@%${hostname1}%g" >>${out} -echo "s%@hostname2@%${hostname2}%g" >>${out} -echo "s%@hostname3@%${hostname3}%g" >>${out} -echo "s%@hostname1_files@%${hostname1_files}%g" >>${out} -echo "s%@hostname_files@%${hostname_files}%g" >>${out} -echo "s%@hostname2_files@%${hostname2_files}%g" >>${out} -echo "s%@hostname3_files@%${hostname3_files}%g" >>${out} -echo "s%@hostname1_password@%${hostname1_password}%g" >>${out} -echo "s%@hostname2_password@%${hostname2_password}%g" >>${out} -echo "s%@hostname3_password@%${hostname3_password}%g" >>${out} -echo "s%@dirport@%${dirport}%g" >>${out} -echo "s%@sdport@%${sdport}%g" >>${out} -echo "s%@fdport@%${fdport}%g" >>${out} -echo "s%@regressdir@%${cwd}%g" >>${out} -echo "s%@dbengine@%${dbengine}%g" >>${out} -echo "s%@srcdir@%${srcdir}%g" >>${out} -echo "s%@sitename@%${SITE_NAME}%g" >>${out} -echo "s%@os@%${os}%g" >>${out} -echo "s%@bversion@%${bversion}%g" >>${out} -echo "s%@bdate@%${bdate}%g" >>${out} - +scripts/create_sed # process .in files with sed script sed -f ${out} ${cwd}/scripts/bacula-dir.conf.errors.in >${cwd}/scripts/bacula-dir.conf.errors @@ -100,11 +53,7 @@ sed -f ${out} ${cwd}/scripts/bacula-sd-2d.conf.in >${cwd}/scripts/bacula-sd-2d.c sed -f ${out} ${cwd}/scripts/bacula-dir-2d.conf.in >${cwd}/scripts/bacula-dir-2d.conf sed -f ${out} ${cwd}/scripts/bconsole-2d.conf.in >${cwd}/scripts/bconsole-2d.conf -sed -f ${out} ${cwd}/DartConfiguration.tcl.in >${cwd}/DartConfiguration.tcl -sed -f ${out} ${cwd}/DartTestfile.txt.in >${cwd}/DartTestfile.txt - -sed -f ${out} ${cwd}/scripts/update-ctest.in >${cwd}/scripts/update-ctest -chmod +x ${cwd}/scripts/update-ctest +scripts/config_dart # These files have no fancy sed stuff, so we just copy them over cp scripts/win32-bacula-sd-tape.conf.in scripts/win32-bacula-sd-tape.conf