From 663ae2201da1ef166479dd3396f53b6b2d81ae51 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 6 Jul 2003 15:10:12 +0000 Subject: [PATCH] Add bsr optimize test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@621 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/all-non-root-tests | 1 + regress/tests/bsr-opt-test | 73 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 regress/tests/bsr-opt-test diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index b49630dc9f..69d5c68c32 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -16,6 +16,7 @@ tests/bscan-test tests/wierd-files2-test tests/concurrent-jobs-test tests/concurrent2-jobs-test +tests/bsr-opt-test echo " " echo " " echo "Test results" diff --git a/regress/tests/bsr-opt-test b/regress/tests/bsr-opt-test new file mode 100755 index 0000000000..c366cfed5d --- /dev/null +++ b/regress/tests/bsr-opt-test @@ -0,0 +1,73 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory but +# split the archive into two volumes, then restore +# files on only one of the volumes and ensure that +# the other volume is not used. +# +cwd=`pwd` +scripts/copy-test-confs +scripts/cleanup +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 bsr-opt-test ===" +echo " === Starting bsr-opt-test ===" >working/log +echo " " + +bin/bacula start 2>&1 >/dev/null +bin/console -c bin/console.conf <&1 >/dev/null +grep TestVolume001 working/restore.bsr +bsrstat=$? +grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null +rstat=$? +diff -r build/src/cats tmp/bacula-restores${cwd}/build/src/cats +if [ $? != 0 -o $bsrstat != 1 -o $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! bsr-opt-test Bacula source failed!!! !!!!! " + echo " !!!!! bsr-opt-test failed!!! !!!!! " >>test.out + echo " " +else + echo " ===== bsr-opt-test Bacula source OK ===== " + echo " ===== bsr-opt-test OK ===== " >>test.out + scripts/cleanup +fi -- 2.39.5