From b262989ef7d2ada2ce8ccf2cadf9310aee0478e1 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 6 Jul 2003 20:52:16 +0000 Subject: [PATCH] Add new recycle test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@623 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/all-non-root-tests | 2 + regress/tests/recycle-test | 90 ++++++++++++++++++++++++++++++++++++++ regress/tests/two-vol-test | 11 ++--- 3 files changed, 96 insertions(+), 7 deletions(-) create mode 100755 regress/tests/recycle-test diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index 69d5c68c32..1d89005b70 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -17,6 +17,8 @@ tests/wierd-files2-test tests/concurrent-jobs-test tests/concurrent2-jobs-test tests/bsr-opt-test +tests/bextract-test +tests/recycle-test echo " " echo " " echo "Test results" diff --git a/regress/tests/recycle-test b/regress/tests/recycle-test new file mode 100755 index 0000000000..3044693085 --- /dev/null +++ b/regress/tests/recycle-test @@ -0,0 +1,90 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory but +# create three volumes and do six backups causing the +# volumes to be recycled, and cycling through the volumes +# twice. +# +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 recycle-test ===" +echo " === Starting recycle-test ===" >working/log +echo " " + +#bin/bacula start 2>&1 >/dev/null +bin/bacula start +bin/console -c bin/console.conf <&1 >/dev/null +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 tmp/bacula-restores${cwd}/build +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! recycle-test Bacula source failed!!! !!!!! " + echo " !!!!! recycle-test failed!!! !!!!! " >>test.out + echo " " +else + echo " ===== recycle-test Bacula source OK ===== " + echo " ===== recycle-test OK ===== " >>test.out + scripts/cleanup +fi diff --git a/regress/tests/two-vol-test b/regress/tests/two-vol-test index d4795a5057..a7d64e9fa0 100755 --- a/regress/tests/two-vol-test +++ b/regress/tests/two-vol-test @@ -21,17 +21,14 @@ bin/bacula start 2>&1 >/dev/null bin/console -c bin/console.conf <