]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/functions
Extend idea of Prefer Mounted Volumes to mean a volume about
[bacula/bacula] / regress / scripts / functions
index 3a0228cd3f2e53ddb87b179c3cc199e0547b2a73..7da6d3805812f0c25b3106b396813a8bc415dc76 100644 (file)
@@ -41,6 +41,25 @@ run_bconsole()
    fi
 }
 
+run_btape()
+{
+   if test "$debug" -eq 1 ; then
+     cat tmp/bconcmds | bin/btape -c bin/bacula-sd.conf DDS-4 | tee tmp/log1.out
+   else
+     cat tmp/bconcmds | bin/btape -c bin/bacula-sd.conf DDS-4 2>&1 >tmp/log1.out
+   fi
+}
+
+run_bscan()
+{
+   if test "$debug" -eq 1 ; then
+      bin/bscan $* | tee tmp/log.out
+   else
+      bin/bscan $* 2>&1 >/dev/null
+   fi
+}
+
+
 stop_bacula()
 {
    bin/bacula stop 2>&1 >/dev/null
@@ -53,10 +72,18 @@ check_for_zombie_jobs()
 
 change_jobname()
 {
+   if test $# -eq 1; then
+      oldname=NightlySave
+      newname=$1
+   else
+      oldname=$1
+      newname=$2
+   fi
    rm -f bin/1
    mv bin/bacula-dir.conf bin/1
-   echo "s%NightlySave%$1%g" >/tmp/1
-   sed -f /tmp/1 bin/1 >bin/bacula-dir.conf
+   echo "s%${oldname}%${newname}%g" >tmp/1
+   sed -f tmp/1 bin/1 >bin/bacula-dir.conf
+#  echo "Job ${oldname} changed to ${newname}"
 }
 
 check_two_logs()
@@ -97,6 +124,24 @@ end_test()
    else
       echo "  ===== $TestName Bacula source OK `date +%R:%S` ===== "
       echo "  ===== $TestName OK `date +%R:%S` ===== " >>test.out
-      scripts/cleanup
+      if test "$debug" -eq 0 ; then
+         scripts/cleanup
+      fi
    fi
 }
+
+copy_tape_confs()
+{
+   scripts/copy-tape-confs
+   scripts/cleanup-tape
+}
+
+copy_test_confs()
+{
+   scripts/copy-test-confs
+   scripts/cleanup
+}
+
+
+# Save current directory
+cwd=`pwd`