From: Kern Sibbald Date: Fri, 19 Dec 2003 11:11:58 +0000 (+0000) Subject: Add user config files X-Git-Tag: Release-1.34.0~251 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bff6e9d5b06b3fcafb108e025dccb6cb59208403;p=bacula%2Fbacula Add user config files git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@905 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/.cvsignore b/regress/.cvsignore index d07048dead..f29c785374 100644 --- a/regress/.cvsignore +++ b/regress/.cvsignore @@ -6,3 +6,4 @@ weird-files2 diff tmp working +Makefile diff --git a/regress/Makefile.in b/regress/Makefile.in new file mode 100644 index 0000000000..d9435f914a --- /dev/null +++ b/regress/Makefile.in @@ -0,0 +1,67 @@ +# +# Makefile for Bacula regression testing +# +# Note, Makefile is built from Makefile.in, which you should not really +# need to change, by envoking: +# +# ./config +# e.g. +# +# ./config kern.conf +# +# + +# suck in user's configuration +@CONFIG@ + +first_rule: all + +all: + +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 + @rm -rf bin build weird-files tmp + (if test x`uname` = xLinux -o x`uname` = xFreeBSD ; then \ + tar xfz weird-files.tar.gz ;\ + fi) + rm -rf tmp working + mkdir tmp working + scripts/setup ${BACULA_SOURCE} ${DEPKGS} ${EMAIL} + scripts/do_sed ${EMAIL} ${TAPE_DRIVE} ${AUTOCHANGER} ${AUTOCHANGER_PATH} + +# Run all non-root userid tests +test: + ./all-non-root-tests + +# run all file and tape tests +full_test: + ./all-tape-and-file-tests + +# These tests require you to run as root +root_test: + ./all-root-tests + +clean: + scripts/cleanup + rm -f /tmp/file-list + rm -f tmp/* working/* + rm -f test.out + rm -f diff + rm -f 1 2 3 scripts/1 scripts/2 scripts/3 tests/1 tests/2 tests/3 + +# Reset our userid after running as root +reset: + chown -R ${USER}:${USER} . tmp working + scripts/cleanup + rm -f /tmp/file-list tmp/file-list + rm -f tmp/* working/* + +distclean: clean + rm -rf bin build weird-files weird-files weird-files2 tmp working + rm -f scripts/*.conf + diff --git a/regress/README b/regress/README index ad5056c4e2..934681817f 100644 --- a/regress/README +++ b/regress/README @@ -1,33 +1,33 @@ Bacula Regression - Kern Sibbald - April 2003 + Kern Sibbald + April 2003 This is Bacula's regression script directory. At this time -(May 2003), it is still in development, so all the tests are +(December 2003), it is still in development, so all the tests are not complete. -To set it up, first edit Makefile and set BACULA-SOURCE to point -to your source. +To set it up, create your personal configuration file, by +copying prototype.conf to xxx.conf or simply editing prototype.conf +directly. -!!!!!!!!!! IMPORTANT !!!!!!!! -Second, edit the EMAIL address in the Makefile to be your -email address and not mine or I will get LOTS of unwanted -email! +Then edit your conf file and define appropriate values +for the variables that are in that file. If you want to see +a real example, look at kern.conf, but please don't use my +email address! -Third, edit the DEPKGS path in the Makefile to point to the -depkgs directory. - -Fourth, make sure that depkgs is pre-built if it isn't +Make sure that depkgs is pre-built if it isn't already: (cd your-depkgs; make sqlite). Then do: + ./config xxx.conf make setup -You run the above one time. This will copy the Bacula -source, configure, build it, and configure all the scripts -and conf files. If you change your source, you will need -to redo this command. +You run the above one time. This will build a Makefile from +Makefile.in and your xxx.conf file, copy the Bacula source, +configure, build it, and configure all the Bacula scripts +and conf files. If you change your source, you will need to +redo this command. Then you can run any of the tests in the tests subdirectory. Each test whose name ends in -root requires you to be root for diff --git a/regress/config b/regress/config new file mode 100755 index 0000000000..860dfcc405 --- /dev/null +++ b/regress/config @@ -0,0 +1,5 @@ +#/bin/sh +# +# First argument is expected to be a user's configuration file +# +sed -e "/@CONFIG@/r $1" -e "s/@CONFIG@//" Makefile.in >Makefile diff --git a/regress/kern.conf b/regress/kern.conf new file mode 100644 index 0000000000..1b85ca11bc --- /dev/null +++ b/regress/kern.conf @@ -0,0 +1,15 @@ +# Where to get the source to be tested +BACULA_SOURCE="${HOME}/bacula/k" + +# Where to send email !!!!! Change me !!!!!!! +EMAIL=kern+ok@sibbald.com + +# Full path where to find sqlite +DEPKGS="${HOME}/bacula/depkgs/sqlite" + +TAPE_DRIVE="/dev/nst0" +# if you don't have an autochanger set AUTOCHANGER to /dev/null +AUTOCHANGER="/dev/sg0" + +# This must be the path to the autochanger including its name +AUTOCHANGER_PATH="/bin/mtx" diff --git a/regress/prototype.conf b/regress/prototype.conf new file mode 100644 index 0000000000..534f8cab36 --- /dev/null +++ b/regress/prototype.conf @@ -0,0 +1,17 @@ + +# Where to get the source to be tested +BACULA_SOURCE="" + +# Where to send email messages +EMAIL="" + +# Full path where to find sqlite +DEPKGS="${HOME}/bacula/depkgs/sqlite" + +TAPE_DRIVE="/dev/nst0" + +# if you don't have an autochanger set AUTOCHANGER to /dev/null +AUTOCHANGER="/dev/sg0" + +# This must be the path to the autochanger including its name +AUTOCHANGER_PATH="/bin/mtx"