From: Kern Sibbald Date: Mon, 11 Apr 2005 13:16:42 +0000 (+0000) Subject: Update tests for new doc structure X-Git-Tag: Release-1.38.0~562 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cf33d5080ac57603db48b6e11575b7c32de84318;p=bacula%2Fbacula Update tests for new doc structure git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1925 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/Makefile.in b/regress/Makefile.in index 4e63dfbe4f..6d22842150 100644 --- a/regress/Makefile.in +++ b/regress/Makefile.in @@ -24,7 +24,7 @@ setup: bacula # Some machines cannot handle the sticky bit and other garbage that # is in weird-files, so we load and run it only on Linux machines. # -bacula: all +bacula: all sed @rm -rf bin build weird-files tmp (if test x`uname` = xLinux -o x`uname` = xFreeBSD ; then \ tar xfz weird-files.tar.gz ;\ @@ -32,6 +32,8 @@ bacula: all rm -rf tmp working mkdir tmp working scripts/setup ${BACULA_SOURCE} ${EMAIL} ${WHICHDB} ${TCPWRAPPERS} + +sed: scripts/do_sed ${EMAIL} ${TAPE_DRIVE} ${AUTOCHANGER} ${AUTOCHANGER_PATH} # Run all non-root userid tests diff --git a/regress/all-tape-and-file-tests b/regress/all-tape-and-file-tests index 9bc3e7676c..62573465e2 100755 --- a/regress/all-tape-and-file-tests +++ b/regress/all-tape-and-file-tests @@ -3,4 +3,7 @@ # Run all tests # ./all-non-root-tests +if [ ! -e bin/tape_options ] ; then + touch bin/tape_options +fi ./all-non-root-tape-tests diff --git a/regress/do_all b/regress/do_all index 8df3b966fa..ad511a4a7d 100755 --- a/regress/do_all +++ b/regress/do_all @@ -1,5 +1,13 @@ #!/bin/sh +/home/kern/bacula/bin/startmysql make setup ./starttime +if [ ! -e bin/tape_options ] ; then + touch bin/tape_options +fi ./all-tape-and-file-tests +if [ ! -e bin/tape_options ] ; then + touch bin/tape_options +fi +./all-non-root-2tape-tests ./endtime diff --git a/regress/kern.conf b/regress/kern.conf index 866014cabf..b87dd8e8b5 100644 --- a/regress/kern.conf +++ b/regress/kern.conf @@ -12,7 +12,7 @@ TAPE_DRIVE="/dev/nst0" AUTOCHANGER="/dev/sg0" # This must be the path to the autochanger including its name -AUTOCHANGER_PATH="/usr/local/bin/mtx" +AUTOCHANGER_PATH="/usr/sbin/mtx" # Set your database here WHICHDB="--with-sqlite=${SQLITE_DIR}" @@ -20,4 +20,3 @@ WHICHDB="--with-sqlite=${SQLITE_DIR}" # Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" TCPWRAPPERS="--with-tcp-wrappers" - diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index e999a521fc..c5df3acaa5 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -48,11 +48,12 @@ sed "s%^MTX.*$%MTX=${4}%g" /tmp/bac$$ >${cwd}/bin/mtx-changer chmod 777 ${cwd}/bin/mtx-changer # get proper SD tape definitions +touch ${cwd}/bin/tape_options if test x`uname` = xLinux ; then \ - cp -f scripts/linux_tape_options bin/tape_options ; \ + cp -f ${cwd}/scripts/linux_tape_options ${cwd}/bin/tape_options ; \ fi if test x`uname` = xFreeBSD ; then \ - cp -f scripts/freebsd_tape_options bin/tape_options ; \ + cp -f ${cwd}/scripts/freebsd_tape_options ${cwd}/bin/tape_options ; \ fi rm -f ${out} diff --git a/regress/scripts/flist b/regress/scripts/flist index 7e7e1f0bf8..aa390099d9 100644 --- a/regress/scripts/flist +++ b/regress/scripts/flist @@ -1,4 +1,6 @@ -/build/doc/bacula.pdf +/build/doc/Makefile.in +/build/doc/latex/bacula.tex +/build/doc/images/win32-welcome.pdf /build/configure /build/src/stored/bextract /build/src/tools/testfind diff --git a/regress/scripts/prepare-two-tapes.in b/regress/scripts/prepare-two-tapes.in index 44cb7f90c6..f31c0abe55 100755 --- a/regress/scripts/prepare-two-tapes.in +++ b/regress/scripts/prepare-two-tapes.in @@ -10,4 +10,4 @@ mt -f @tape_drive@ weof @changer_path@ -f @autochanger@ load 2 mt -f @tape_drive@ rewind mt -f @tape_drive@ weof -@changer_path@ -f @autochanger@ unload +#@changer_path@ -f @autochanger@ unload diff --git a/regress/tests/backup-bacula-tape b/regress/tests/backup-bacula-tape index 304559d758..a8343e0a3c 100755 --- a/regress/tests/backup-bacula-tape +++ b/regress/tests/backup-bacula-tape @@ -12,8 +12,8 @@ echo "${cwd}/build" >/tmp/file-list echo " " echo " " -echo " === Starting Bacula tape test at `date +%R:%S` ===" -echo " === Starting Bacula tape test at `date +%R:%S` ===" >>working/log +echo " === Starting Backup Bacula tape test at `date +%R:%S` ===" +echo " === Starting Backup Bacula tape test at `date +%R:%S` ===" >>working/log echo " " bin/bacula start 2>&1 >/dev/null @@ -104,11 +104,11 @@ diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " - echo " !!!!! Bacula tape test Bacula source failed!!! !!!!! " - echo " !!!!! Bacula tape test failed!!! !!!!! " >>test.out + echo " !!!!! Backup Bacula tape test failed!!! !!!!! " + echo " !!!!! Backup Bacula tape test failed!!! !!!!! " >>test.out echo " " else - echo " ===== Bacula tape test Bacula source OK ===== " - echo " ===== Bacula tape test OK ===== " >>test.out + echo " ===== Backup Bacula tape test OK ===== " + echo " ===== Backup Bacula tape test OK ===== " >>test.out scripts/cleanup fi diff --git a/regress/tests/two-volume-tape b/regress/tests/two-volume-tape index 1c57efd21b..8c28f19dc5 100755 --- a/regress/tests/two-volume-tape +++ b/regress/tests/two-volume-tape @@ -2,17 +2,16 @@ # # Run a simple backup of the Bacula build directory # to two tapes where the maximum tape file size is set to 1M +# Note, this test simulates the tape filling and writing to +# the next tape. # cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null +scripts/cleanup scripts/copy-2tape-confs scripts/prepare-two-tapes + echo "${cwd}/build" >/tmp/file-list -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. + out="tmp/sed_tmp" echo "s%# Maximum File Size% Maximum File Size%g" >${out} cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 @@ -47,6 +46,7 @@ messages quit END_OF_DATA scripts/check_for_zombie_jobs storage=DDS-4 + bin/bacula stop 2>&1 >/dev/null grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null bstat=$?