]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Add strip path option
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 24 Feb 2008 19:55:10 +0000 (19:55 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 24 Feb 2008 19:55:10 +0000 (19:55 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6484 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/bacula-dir.conf.accurate.in
regress/tests/accurate-test

index e99d7afe8f4d1440482f1760f3cd91a9037eefa7..32b89f2783a69c2fe0e8e1bc13343a773ec4eb6b 100644 (file)
@@ -47,6 +47,17 @@ FileSet {
  }
 }
 
+FileSet {
+ Name = FS_TESTJOB2
+ Include {
+   Options {
+    Verify = mc
+    strippath=1
+   }
+   File=<@tmpdir@/file-list
+ }
+}
+
 FileSet {
  Name = FS_TESTJOB_ADVANCE
  Include {
index ba9d0ca6404d626fb6ba25eb279c57bb1f861c13..ee5aff01a1d560350ea699fbf015f359deda2016 100755 (executable)
@@ -277,6 +277,48 @@ then
     bstat=2
 fi
 
+################################################################
+# Test strippath option
+################################################################
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out ${cwd}/tmp/log1.out
+setdebug  level=1 client
+run job=backup fileset=FS_TESTJOB2 yes
+wait
+messages
+@$out ${cwd}/tmp/log3.out
+st dir
+quit
+END_OF_DATA
+
+run_bconsole
+check_for_zombie_jobs storage=File
+
+# run incremental
+rm -f ${cwd}/build/accurate/yyy
+run_bconsole
+check_for_zombie_jobs storage=File
+
+jobid=$(awk '/ Incr.+backup/ { jobid=$1 } END { print jobid }' ${cwd}/tmp/log3.out)
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out ${cwd}/tmp/log3.out
+list files jobid=$jobid
+quit
+END_OF_DATA
+
+run_bconsole
+
+if ! grep yyy ${cwd}/tmp/log3.out > /dev/null
+then
+    bstat=2
+fi
+
+if grep zzz ${cwd}/tmp/log3.out > /dev/null
+then
+    bstat=2
+fi
 
 stop_bacula
 end_test