]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/fifo-test
regress: add bconsole test
[bacula/bacula] / regress / tests / fifo-test
index 05980a8cd2a1c0eac6d8f12192b045d04d0f6243..dffdf677978b07327667ff49bea850c8d9b5fc30 100755 (executable)
@@ -5,25 +5,23 @@
 TestName="fifo-test"
 JobName=FIFOTest
 . scripts/functions
-set_debug 0
 
-cwd=`pwd`
 scripts/cleanup
 scripts/copy-test-confs
-echo "/tmp/bfifo" >/tmp/file-list
+echo "${cwd}/tmp/bfifo" >${cwd}/tmp/file-list
 
-rm -f /tmp/bfifo
-mkfifo /tmp/bfifo
+rm -f ${cwd}/tmp/bfifo
+mkfifo ${cwd}/tmp/bfifo
 # send a file into the fifo
 file=encrypt-bug.jpg
-cat ${file} >/tmp/bfifo&
+cat ${file} >${cwd}/tmp/bfifo&
 
 start_test
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @$out /dev/null
 messages
-@$out tmp/log1.out
+@$out ${cwd}/tmp/log1.out
 label storage=File1 volume=TestVolume001
 run job=$JobName storage=File1 yes
 wait
@@ -34,23 +32,22 @@ END_OF_DATA
 
 run_bacula
 
-cat <<END_OF_DATA >tmp/bconcmds
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @$out /dev/null
 messages
 @# 
 @# now do a restore
 @#
-@$out tmp/log2.out
-@#setdebug level=50 client
+@$out ${cwd}/tmp/log2.out
+@#setdebug level=50 client=$CLIENT
 restore where=/  select all storage=File1 done
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
-cat </tmp/bfifo >tmp/${file}&
+cat <${cwd}/tmp/bfifo >${cwd}/tmp/${file}&
 
 run_bconsole
 
@@ -58,6 +55,6 @@ check_for_zombie_jobs storage=File1
 stop_bacula
 
 check_two_logs
-diff ${file} tmp/${file}
+diff ${file} ${cwd}/tmp/${file}
 dstat=$?
 end_test