]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-cat-test
Fix regression on Solaris.
[bacula/bacula] / regress / tests / verify-cat-test
1 #!/bin/sh
2 #
3 # Run a simple Verify InitCatalog, then Verify Catalog
4 #
5 TestName="verify-cat-test"
6 JobName=VerifyCatalog
7 . scripts/functions
8
9 cwd=`pwd`
10 scripts/cleanup
11 scripts/copy-test-confs
12 echo "${cwd}/build" >${cwd}/tmp/file-list
13 #echo "${cwd}/do_all" >${cwd}/tmp/file-list
14 #echo "${cwd}/do_all_tapes" >>${cwd}/tmp/file-list
15 #echo "${cwd}/do_file" >>${cwd}/tmp/file-list
16
17 change_jobname NightlySave $JobName
18 start_test
19
20 cat <<END_OF_DATA >tmp/bconcmds
21 @output /dev/null
22 messages
23 @$out tmp/log1.out
24 @#exec "sh -c 'touch ${cwd}/build/xxx_new_file'"
25 run job=VerifyVolume level=InitCatalog yes
26 wait
27 messages
28 @# 
29 @# now do a verify Catalog
30 @#
31 @$out ${cwd}/tmp/original
32 @#exec "sh -c 'rm -f ${cwd}/build/xxx_new_file'"
33 run job=VerifyVolume level=Catalog yes
34 wait
35 messages
36 quit
37 END_OF_DATA
38
39 run_bacula
40
41 sleep 2
42 check_for_zombie_jobs storage=File 
43 stop_bacula
44
45 grep "^  Termination: *Verify OK" tmp/log1.out 2>&1 >/dev/null
46 bstat=$?
47 grep "^  Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
48 rstat=$?
49 dstat=0
50 end_test