]> git.sur5r.net Git - bacula/bacula/commitdiff
Add two volume test
authorKern Sibbald <kern@sibbald.com>
Thu, 22 May 2003 17:06:01 +0000 (17:06 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 22 May 2003 17:06:01 +0000 (17:06 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@533 91ce42f0-d328-0410-95d8-f526ca767f89

regress/all-non-root-tests
regress/tests/two-vol-test [new file with mode: 0755]

index 29e226aab5566d1c3f1a506b537c1ba7e14e953e..21b32098c455264fed093b82c48d3c79f4b8eab2 100755 (executable)
@@ -10,6 +10,7 @@ tests/compressed-test
 tests/sparse-compressed-test
 tests/wierd-files-test
 tests/two-jobs-test
+tests/two-vol-test
 echo " "
 echo " "
 echo "Test results"
diff --git a/regress/tests/two-vol-test b/regress/tests/two-vol-test
new file mode 100755 (executable)
index 0000000..2192c86
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory but 
+#   split the archive into two volumes
+#
+cwd=`pwd`
+scripts/copy-test-confs
+rm -rf tmp/TestVolume001 tmp/TestVolume002 tmp/bacula-restores
+echo "${cwd}/build" >/tmp/file-list
+bin/bacula stop 2>&1 >/dev/null
+bin/drop_sqlite_tables
+bin/make_sqlite_tables
+
+echo " "
+echo " "
+echo " === Starting two-vol-test  ==="
+echo " "
+
+bin/bacula start
+bin/console -c bin/console.conf <<END_OF_DATA
+@output /dev/null
+messages
+label storage=File1
+TestVolume001
+label storage=File1
+TestVolume002
+update Volume=TestVolume001
+6
+3000000
+10
+@output
+run job=NightlySave storage=File1
+yes
+wait
+messages
+@# 
+@# now do a restore
+@#
+restore where=${cwd}/tmp/bacula-restores
+5
+done
+yes
+wait
+messages
+quit
+END_OF_DATA
+bin/bacula stop
+diff -ur build  tmp/bacula-restores${cwd}/build
+if [ $? != 0 ] ; then
+   echo " "
+   echo " "
+   echo "  ===== two-vol-test Bacula source failed!!! ===== "
+   echo "  ===== two-vol-test failed!!! ===== " >>test.out
+   echo " "
+else
+   echo "  ===== two-vol-test Bacula source OK ===== "
+   echo "  ===== two-vol-test OK ===== " >>test.out
+   rm -rf tmp/bacula-restores tmp/TestVolume001 tmp/TestVolume002
+fi