]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/lib-tape-root
ebl Tweak the test to use "wait mount" instead of sleep
[bacula/bacula] / regress / tests / lib-tape-root
index c0cec63d7668a0c91e71be581074cd486cd07cc8..9044d1c088c7968967fe6d4373d6941834c249bd 100755 (executable)
@@ -5,26 +5,20 @@
 #
 cwd=`pwd`
 . scripts/functions
-bin/bacula stop 2>&1 >/dev/null
-cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
-cd ..
-
+scripts/cleanup
 scripts/cleanup-tape
 scripts/copy-tape-confs
-echo "/lib" >/tmp/file-list
+echo "/lib" >${cwd}/tmp/file-list
 echo " "
 echo " "
 echo " === Starting lib-tape-root test ==="
 echo " "
 echo " "
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+
+cat <<END_OF_DATA > >${cwd}/tmp/bconcmds
 @output /dev/null
 messages
-@output tmp/log1.out
+@output ${cwd}/tmp/log1.out
 label storage=DDS-4 Volume=TestVolume001 slot=0
 run job=NightlySave yes
 wait
@@ -32,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
@@ -40,7 +34,10 @@ messages
 @output
 quit
 END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
+
+run_bacula
+stop_bacula
+
 cd /
 ${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
 cd ${cwd}/tmp/bacula-restores
@@ -54,7 +51,7 @@ sort <1 >restored
 rm -f 1
 #
 cd ${cwd}
-diff tmp/original tmp/restored 2>&1 1>/dev/nul
+diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 1>/dev/nul
 if [ $? != 0 ] ; then
    echo " "
    echo " "