X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fdev-test-root;h=0d005e56b7f0a21d970504406586f00152e9288f;hb=ebba96a2482b01553cd098c0770ee2b42ce634ce;hp=26ae6fee840c3ad044f8b8c3b27c6f921efbc1e6;hpb=00b2e2f4e4580254fdcd9a4f746faedd2c955386;p=bacula%2Fbacula diff --git a/regress/tests/dev-test-root b/regress/tests/dev-test-root index 26ae6fee84..0d005e56b7 100755 --- a/regress/tests/dev-test-root +++ b/regress/tests/dev-test-root @@ -3,34 +3,22 @@ # 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 "/dev" >${cwd}/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 <${cwd}/tmp/bconcmds @output /dev/null messages -@output tmp/log1.out +@output ${cwd}/tmp/log1.out label storage=File volume=TestVolume001 run job=NightlySave yes wait @@ -38,7 +26,7 @@ messages @# @# now do a restore @# -@output tmp/log2.out +@output ${cwd}/tmp/log2.out restore where=${cwd}/tmp/bacula-restores select all done yes wait @@ -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 @@ -71,7 +65,7 @@ sed -f sed.scr 1 | sort >restored rm -f sed.scr # cd ${cwd} -diff tmp/original tmp/restored 2>&1 1>/dev/null +diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/null if [ $? != 0 ] ; then echo " " echo " "