]> git.sur5r.net Git - bacula/bacula/commitdiff
Add a regress script for Exclude Dir Containing option
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 9 Sep 2009 07:37:42 +0000 (09:37 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 9 Sep 2009 07:37:42 +0000 (09:37 +0200)
regress/tests/exclude-dir-test [new file with mode: 0755]

diff --git a/regress/tests/exclude-dir-test b/regress/tests/exclude-dir-test
new file mode 100755 (executable)
index 0000000..b4ae49c
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory using the compressed option
+#   then backup a second time and finally restore it
+#
+TestName="exclude-dir-test"
+JobName=exclude-dir
+. scripts/functions
+
+cwd=`pwd`
+scripts/cleanup
+scripts/copy-test-confs
+echo "${cwd}/build" >${cwd}/tmp/file-list
+sed 's/Include {/Include { Exclude Dir Containing = ".nobkp"/' $conf/bacula-dir.conf > $tmp/1
+cp -f $tmp/1 $conf/bacula-dir.conf
+change_jobname CompressedTest $JobName
+start_test
+
+cat >tmp/bconcmds <<END_OF_DATA
+@$out /dev/null
+messages
+@$out $tmp/log3.out
+estimate job=$JobName listing
+messages
+@$out $tmp/log1.out
+label storage=File volume=TestVolume001
+run job=$JobName yes
+wait
+messages
+@$out $tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select all storage=File done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File 
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test