]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fifo-test
Updates plus put debug output and debugger on environment variables
[bacula/bacula] / regress / tests / fifo-test
1 #!/bin/sh
2 #
3 # Attempt to backup from a fifo and restore to a fifo
4 #
5 TestName="fifo-test"
6 JobName=FIFOTest
7 . scripts/functions
8 set_debug 0
9
10 cwd=`pwd`
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "/tmp/bfifo" >/tmp/file-list
14
15 rm -f /tmp/bfifo
16 mkfifo /tmp/bfifo
17 # send a file into the fifo
18 file=encrypt-bug.jpg
19 cat ${file} >/tmp/bfifo&
20
21 start_test
22
23 cat <<END_OF_DATA >tmp/bconcmds
24 @$out /dev/null
25 messages
26 @$out tmp/log1.out
27 label storage=File1 volume=TestVolume001
28 run job=$JobName storage=File1 yes
29 wait
30 messages
31 quit
32 END_OF_DATA
33
34
35 run_bacula
36
37 cat <<END_OF_DATA >tmp/bconcmds
38 @$out /dev/null
39 messages
40 @# 
41 @# now do a restore
42 @#
43 @$out tmp/log2.out
44 @#setdebug level=50 client
45 restore where=/  select all storage=File1 done
46 yes
47 wait
48 messages
49 @$out
50 quit
51 END_OF_DATA
52
53 cat </tmp/bfifo >tmp/${file}&
54
55 run_bconsole
56
57 check_for_zombie_jobs storage=File1
58 stop_bacula
59
60 check_two_logs
61 diff ${file} tmp/${file}
62 dstat=$?
63 end_test