]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/four-concurrent-jobs-tape
regress: Add test for new PurgeMigrateJob option
[bacula/bacula] / regress / tests / four-concurrent-jobs-tape
1 #!/bin/sh
2 #
3 # Run four jobs at the same time
4 #
5 TestName="four-concurrent-jobs-tape"
6 JobName=FourConcurrentJobs
7 . scripts/functions
8
9 require_tape_drive
10
11 scripts/cleanup-tape
12 scripts/copy-tape-confs
13
14 echo "${cwd}/build" >${cwd}/tmp/file-list
15
16 change_jobname $JobName
17 start_test
18
19 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
20 @$out /dev/null
21 messages
22 @$out ${cwd}/tmp/log1.out
23 label storage=tape volume=TestVolume001 slot=0 pool=Default
24 run job=$JobName level=Full Storage=tape yes
25 run job=$JobName level=Full Storage=tape yes
26 run job=$JobName level=Full Storage=tape yes
27 run job=$JobName level=Full Storage=tape yes
28 @sleep 2
29 status dir
30 @sleep 5
31 status dir
32 status storage=tape
33 messages
34 wait
35 messages
36 @$out ${cwd}/tmp/jobmedia.out
37 list volumes
38 sql
39 select JobId,MediaId,StartFile,StartBlock,EndFile,EndBlock from JobMedia;
40
41 @# 
42 @# now do a restore
43 @#
44 @$out ${cwd}/tmp/log2.out
45 restore where=${cwd}/tmp/bacula-restores select storage=tape
46 unmark *
47 mark *
48 done
49 yes
50 wait
51 messages
52 quit
53 END_OF_DATA
54
55 run_bacula
56 check_for_zombie_jobs storage=tape
57 stop_bacula
58
59 check_two_logs
60 check_restore_diff
61 end_test