]> git.sur5r.net Git - bacula/bacula/commitdiff
Add user config files
authorKern Sibbald <kern@sibbald.com>
Fri, 19 Dec 2003 11:11:58 +0000 (11:11 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 19 Dec 2003 11:11:58 +0000 (11:11 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@905 91ce42f0-d328-0410-95d8-f526ca767f89

regress/.cvsignore
regress/Makefile.in [new file with mode: 0644]
regress/README
regress/config [new file with mode: 0755]
regress/kern.conf [new file with mode: 0644]
regress/prototype.conf [new file with mode: 0644]

index d07048deada8fbcd1844924e729fd60594937e85..f29c7853747aee3573db38397c22c54f60b948e6 100644 (file)
@@ -6,3 +6,4 @@ weird-files2
 diff
 tmp
 working
+Makefile
diff --git a/regress/Makefile.in b/regress/Makefile.in
new file mode 100644 (file)
index 0000000..d9435f9
--- /dev/null
@@ -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 <user's configuration>
+# 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
+                     
index ad5056c4e2cb21ff09e59a0f941ba49bf9663ce1..934681817f37b88031abec894742663261f57654 100644 (file)
@@ -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 (executable)
index 0000000..860dfcc
--- /dev/null
@@ -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 (file)
index 0000000..1b85ca1
--- /dev/null
@@ -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 (file)
index 0000000..534f8ca
--- /dev/null
@@ -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"