]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/maxruntime-test
regress: tweak the message in the update_win32()
[bacula/bacula] / regress / tests / maxruntime-test
1 #!/bin/sh
2 #
3 #  Test MaxRunTime
4 #  Note: this test doesn't really do anything yet. It is used in helping
5 #    to duplicate bug #1268, but so far not successful ...
6 #
7
8 TestName="maxruntime-test"
9 JobName=backup
10
11 . scripts/functions
12
13 copy_test_confs
14
15 rm -f ${cwd}/tmp/RUN*log
16 cp -f ${cwd}/scripts/bacula-dir.conf.maxruntime ${cwd}/bin/bacula-dir.conf
17 WHEN=`date '+%Y-%m-%d %H:%M:%S'`
18
19 echo "${cwd}/build/po" >${cwd}/tmp/file-list
20
21 start_test
22
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
24 @$out ${cwd}/tmp/log1.out
25 messages
26 label volume=TestVolume001 pool=PoolA
27 label volume=TestVolume002 pool=Default
28 mount
29 wait
30 messages
31 setdebug level=60 dir
32 run job=RUN_MAXRUNTIME pool=PoolA yes
33 wait
34 messages
35 st dir
36 quit
37 END_OF_DATA
38
39 (mkfifo ${cwd}/tmp/fifo 
40  mkfifo ${cwd}/tmp/fifo2
41  mkfifo ${cwd}/tmp/fifo3) 2> /dev/null
42
43 run_bacula
44 check_for_zombie_jobs storage=File
45 stop_bacula
46
47 rm -f ${cwd}/tmp/fifo ${cwd}/tmp/fifo2 ${cwd}/tmp/fifo3
48
49 dstat=0
50 bstat=0
51 rstat=0
52 touch ${cwd}/tmp/log2.out
53
54 grep -e ': Fatal error: Max run time exceeded. Job canceled.' ${cwd}/tmp/log1.out >/dev/null 
55 if [ $? -eq 0 ]
56 then
57     [ "$debug" = 1 ] && echo MAXRUNTIME ok
58 else
59    echo "MAXRUNTIME in error"
60    bstat=1
61 fi
62
63 end_test