]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/four-concurrent-jobs-tape
d3ede9a78063b1e73f4435aaa381273a8b6f73aa
[bacula/bacula] / regress / tests / four-concurrent-jobs-tape
1 #!/bin/sh
2 #
3 # Run two jobs at the same time
4 #
5 cwd=`pwd`
6 bin/bacula stop 2>&1 >/dev/null
7 bin/drop_sqlite_tables
8 bin/make_sqlite_tables
9 scripts/copy-tape-confs
10 scripts/cleanup-tape
11 echo "${cwd}/build" >/tmp/file-list
12
13 echo " "
14 echo " "
15 echo " === Starting four-concurent-jobs-tape  ==="
16 echo " === Starting four-concurent-jobs-tape  ===" >>working/log
17 echo " "
18
19 #bin/bacula start 2>&1 >/dev/null
20 bin/bacula start
21 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
22 @output /dev/null
23 messages
24 @output tmp/log1.out
25 label storage=DDS-4 volume=TestVolume001 slot=0
26 run job=NightlySave level=Full Storage=DDS-4 yes
27 run job=NightlySave level=Full Storage=DDS-4 yes
28 run job=NightlySave level=Full Storage=DDS-4 yes
29 run job=NightlySave level=Full Storage=DDS-4 yes
30 @sleep 2
31 status dir
32 @sleep 5
33 messages
34 wait
35 messages
36 @# 
37 @# now do a restore
38 @#
39 @output tmp/log2.out
40 restore where=${cwd}/tmp/bacula-restores select all
41 yes
42 wait
43 messages
44 @output
45 quit
46 END_OF_DATA
47
48 bin/bacula stop 2>&1 >/dev/null
49 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
50 bstat=$?
51 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
52 rstat=$?
53 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
54 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
55    echo " "
56    echo " "
57    echo "  !!!!! four-concurent-jobs-tape Bacula source failed!!! !!!!! "
58    echo "  !!!!! four-concurent-jobs-tape failed!!! !!!!! " >>test.out
59    echo " "
60    exit 1
61 else
62    echo "  ===== four-concurent-jobs-tape Bacula source OK ===== "
63    echo "  ===== four-concurent-jobs-tape OK ===== " >>test.out
64    scripts/cleanup
65    exit 0
66 fi