]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/functions
ebl update for next-vol test
[bacula/bacula] / regress / scripts / functions
index a6ab409bae40b39cd3b34b391e9378d618c6179d..96095a3981a661e17e56215a9fb5c465141dbecb 100644 (file)
@@ -2,6 +2,7 @@
 # A set of useful functions to be sourced in each test
 #
 
+
 start_test()
 {
    # Turn off email
@@ -55,6 +56,13 @@ if test x${AUTOCHANGER} = x/dev/null ; then
 fi
 }
 
+require_vtape() 
+{
+if test x${USE_VTAPE} = x ; then
+   echo "$TestName test needs the vtape driver."
+   exit 1
+fi
+}
 
 skip_if_no_autochanger()
 {
@@ -131,8 +139,8 @@ bscan_libdbi()
    B_p=`echo $B | awk '{print $9}'`
 
    BSCANLIBDBI="${LIBDBI:+1}"
-               
-   if test "$BSCANLIBDBI" -eq "1" ; then
+                
+   if test "$BSCANLIBDBI" = "1" ; then
       BSCANLIBDBI="-D $B_D -h $B_t -t $B_p"
    else
       BSCANLIBDBI=" "
@@ -252,9 +260,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
@@ -272,3 +292,6 @@ fi
 
 # Source the configuration variables
 . ${cwd}/config
+
+CLIENT=${HOST}-fd
+AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer}