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