From: Kern Sibbald Date: Fri, 20 Jun 2008 15:51:00 +0000 (+0000) Subject: Update X-Git-Tag: Release-2.4.1~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f5e9c3bcfdae783491b0696bd487ce1bdd09bebb;p=bacula%2Fbacula Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7195 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/DartTestfile.txt.in b/regress/DartTestfile.txt.in index 5b0e20222a..197c1c8778 100644 --- a/regress/DartTestfile.txt.in +++ b/regress/DartTestfile.txt.in @@ -51,8 +51,11 @@ ADD_TEST(disk:2drive-3pool-test "@regressdir@/tests/2drive-3pool-test") ADD_TEST(disk:2drive-swap-test "@regressdir@/tests/2drive-swap-test") ADD_TEST(disk:2drive-concurrent-test "@regressdir@/tests/2drive-concurrent-test") ADD_TEST(disk:2drive-incremental-2disk "@regressdir@/tests/2drive-incremental-2disk") + ADD_TEST(changer:incremental-2tape "@regressdir@/tests/incremental-2tape") ADD_TEST(changer:two-volume-tape "@regressdir@/tests/two-volume-tape") +ADD_TEST(changer:two-vol-manual-tape "@regressdir@/tests/two-vol-manual-tape") + ADD_TEST(tape:ansi-label-tape "@regressdir@/tests/ansi-label-tape") ADD_TEST(tape:backup-bacula-tape "@regressdir@/tests/backup-bacula-tape") ADD_TEST(tape:bscan-tape "@regressdir@/tests/bscan-tape") @@ -66,6 +69,7 @@ ADD_TEST(tape:small-file-size-tape "@regressdir@/tests/small-file-size-tape") ADD_TEST(tape:truncate-bug-tape "@regressdir@/tests/truncate-bug-tape") ADD_TEST(tape:two-pool-tape "@regressdir@/tests/two-pool-tape") ADD_TEST(tape:verify-vol-tape "@regressdir@/tests/verify-vol-tape") + ADD_TEST(root:dev-test-root "@regressdir@/tests/dev-test-root") ADD_TEST(root:etc-test-root "@regressdir@/tests/etc-test-root") ADD_TEST(root:lib-test-root "@regressdir@/tests/lib-test-root") diff --git a/regress/all-non-root-tape-tests b/regress/all-non-root-tape-tests index 708aa8389d..545c2710fb 100755 --- a/regress/all-non-root-tape-tests +++ b/regress/all-non-root-tape-tests @@ -25,5 +25,6 @@ nice tests/two-pool-tape nice tests/2drive-incremental-2tape nice tests/bscan-tape nice tests/verify-vol-tape +nice tests/two-vol-manual-tape echo "End all non-root tape tests" echo "End all non-root tape tests" >>test.out diff --git a/regress/prototype.conf b/regress/prototype.conf index 1fb134b7cd..47c14d5548 100644 --- a/regress/prototype.conf +++ b/regress/prototype.conf @@ -32,6 +32,12 @@ SLOT2=2 # For two drive tests -- set to /dev/null if you do not have it TAPE_DRIVE1="/dev/null" +# Set this if you are using fake tape driver +#USE_VTAPE=yes + +# Change this to use disk-changer with vtape +AUTOCHANGER_SCRIPT=mtx-changer + # This must be the path to the autochanger including its name AUTOCHANGER_PATH="/usr/sbin/mtx" @@ -41,6 +47,14 @@ AUTOCHANGER_PATH="/usr/sbin/mtx" #WHICHDB="--with-postgresql" WHICHDB="--with-mysql" +# DB parameters +db_name="regress" +db_user="regress" +db_password= + +# Set this if you use libdbi framework +#LIBDBI="dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport = 5432" + # Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" TCPWRAPPERS="--with-tcp-wrappers" @@ -73,3 +87,14 @@ BASEPORT=8101 # test machines, add some indication of the machine. # SITE_NAME=-bacula-${HOST} + +# +# The following are used only if you want to run Win32 tests, which +# is a real pain since the Win32 machine is not localhost and you +# also need to specify what to backup. +# +WIN32_CLIENT="yyyy" +WIN32_ADDR="yyyy" +WIN32_FILE="c:/users/xxxx" +WIN32_PORT=9102 +WIN32_PASSWORD="zzzzz" diff --git a/regress/scripts/create_sed b/regress/scripts/create_sed index c89bf485ae..350a31a2ea 100755 --- a/regress/scripts/create_sed +++ b/regress/scripts/create_sed @@ -8,13 +8,18 @@ mkdir -p ${cwd}/bin mkdir -p ${cwd}/tmp out="${cwd}/tmp/sed_tmp" -# set the ports used by these tests +# set ports and other default parameters BASEPORT=${BASEPORT:-8101} AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer} +LIBDBI=${LIBDBI:-} +libdbi=${LIBDBI} srcdir=${BACULA_SOURCE} dirport=${BASEPORT} fdport=`expr ${BASEPORT} '+' 1` sdport=`expr ${BASEPORT} '+' 2` +db_name=${db_name:-"regress"} +db_user=${db_user:-"regress"} +db_password=${db_password:-""} os=`uname -s`-`./scripts/get-os` dbengine=`echo ${WHICHDB} | sed -e 's/--with-//' -e 's/=.*//'` bversion=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` @@ -57,3 +62,12 @@ 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} +echo "s%@libdbi@%${libdbi}%g" >>${out} +echo "s%@win32_client@%${WIN32_CLIENT}%g" >>${out} +echo "s%@win32_addr@%${WIN32_ADDR}%g" >>${out} +echo "s%@win32_file@%${WIN32_FILE}%g" >>${out} +echo "s%@win32_port@%${WIN32_PORT}%g" >>${out} +echo "s%@win32_password@%${WIN32_PASSWORD}%g" >>${out} +echo "s%@db_name@%${db_name}%g" >>${out} +echo "s%@db_user@%${db_user}%g" >>${out} +echo "s%@db_password@%${db_password}%g" >>${out} diff --git a/regress/scripts/functions b/regress/scripts/functions index 50c92e0c3b..b76f70f5b0 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -56,11 +56,20 @@ if test x${AUTOCHANGER} = x/dev/null ; then fi } -require_faketape() +require_vtape() { -if test x${USE_FAKETAPE} = x ; then - echo "$TestName test needs the faketape driver." - exit 1 +if test x${USE_VTAPE} = x ; then + echo "$TestName test needs the vtape driver." + exit 0 +fi +} + +require_linux() +{ +os=`uname` +if [ $os != 'Linux' ]; then + echo "This test $TestName runs only on Linux" + exit 0 fi } @@ -262,9 +271,21 @@ debug_wait() fi } +init_slot() +{ + DRIVE=$1 + SLOT=$2 + if test -n "$DRIVE" -a -n "$SLOT"; then + if test ! -c $DRIVE -a ! -b $DRIVE -a x$USE_VTAPE != x ; then + dir=`dirname $DRIVE` + touch $dir/slot$SLOT + fi + fi +} + init_drive() { - if test a$USE_FAKETAPE = a; then + if test a$USE_VTAPE = a; then mt -f $1 rewind mt -f $1 weof else