]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/dev-test-root
Update
[bacula/bacula] / regress / tests / dev-test-root
index 26ae6fee840c3ad044f8b8c3b27c6f921efbc1e6..66728d646b30075fcf3b70dbbb0d76c67801617e 100755 (executable)
@@ -3,31 +3,19 @@
 # Run a simple backup of the Bacula build directory
 #   then restore it.
 #
-MUID=`/usr/bin/id -u`
-if [ $MUID != 0 ] ; then
-   echo " "
-   echo "You must be root to run this test."
-   echo "  ===== !!!! dev-test-root not run !!!! ===== "
-   echo "  ===== !!!! dev-test-root not run !!!! ===== " >>test.out
-   echo " "
-   exit 1
-fi
-cwd=`pwd`
+
+TestName="dev-test-root"
+. scripts/functions
+
+require_root
+
 scripts/cleanup
 scripts/copy-test-confs
 echo "/dev" >/tmp/file-list
 
-echo " "
-echo " "
-echo " ===     Starting dev-test-root test       ==="
-echo " "
-echo " ===  Note, this test can fail for trivial ==="
-echo " ===  reasons on non-Linux systems.        ==="
-echo " "
-echo " "
+start_test
 
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+cat <<END_OF_DATA >tmp/bconcmds
 @output /dev/null
 messages
 @output tmp/log1.out
@@ -46,7 +34,13 @@ messages
 @output
 quit
 END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
+
+run_bacula  
+check_for_zombie_jobs storage=File
+stop_bacula
+
+# More cleanup needed below
+
 cd /
 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-etc-test dev >${cwd}/tmp/original
 cd ${cwd}/tmp/bacula-restores