From ebb3e4126c2df01be8b2f4944ac52f0d7abedb73 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 24 Feb 2008 19:55:10 +0000 Subject: [PATCH] ebl Add strip path option git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6484 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/bacula-dir.conf.accurate.in | 11 ++++++ regress/tests/accurate-test | 42 +++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/regress/scripts/bacula-dir.conf.accurate.in b/regress/scripts/bacula-dir.conf.accurate.in index e99d7afe8f..32b89f2783 100644 --- a/regress/scripts/bacula-dir.conf.accurate.in +++ b/regress/scripts/bacula-dir.conf.accurate.in @@ -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 { diff --git a/regress/tests/accurate-test b/regress/tests/accurate-test index ba9d0ca640..ee5aff01a1 100755 --- a/regress/tests/accurate-test +++ b/regress/tests/accurate-test @@ -277,6 +277,48 @@ then bstat=2 fi +################################################################ +# Test strippath option +################################################################ + +cat <${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 <${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 -- 2.39.5