]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/four-jobs-test.cmd
Copy trunk regress into Branch
[bacula/bacula] / regress / win32 / tests / four-jobs-test.cmd
1 REM
2 REM Run a simple backup of the Bacula build directory using the compressed option
3 REM   then backup four times, each with incremental then finally restore.
4 REM   It should require at least 4 different bsrs.
5 REM
6 SET TestName=four-jobs-test
7 SET JobName=SpanVol
8
9 CALL scripts\functions set_debug 0
10 CALL scripts\functions copy_test_confs
11
12 ECHO %CD:\=/%/build >${cwd}/tmp/file-list
13
14 CALL scripts\functions change_jobname CompressedTest %JobName%
15 CALL scripts\functions start_test
16
17 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\four-jobs-test.1.bscr >tmp\bconcmds
18
19 CALL scripts\functions run_bacula
20 CALL scripts\functions check_for_zombie_jobs storage=File
21
22 ECHO Backup 1 done
23
24 REM make some files for the incremental to pick up
25 tools\touch %CD:\=/%/build/src/dird/*.c
26 tools\touch %CD:\=/%/build/src/lib/*.c
27    
28 REM
29 REM run a second job
30 REM
31 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\four-jobs-test.2.bscr >tmp\bconcmds
32
33 CALL scripts\functions run_bconsole
34 CALL scripts\functions check_for_zombie_jobs storage=File
35
36 ECHO Backup 2 done
37
38 tools\touch %CD:\=/%/build/src/dird/*.c
39 tools\touch %CD:\=/%/build/src/lib/*.c
40
41 REM
42 REM run a third job
43 REM
44 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\four-jobs-test.3.bscr >tmp\bconcmds
45
46 CALL scripts\functions run_bconsole
47 CALL scripts\functions check_for_zombie_jobs storage=File
48
49 ECHO Backup 3 done
50
51 REM make some files for the incremental to pick up
52 tools\touch %CD:\=/%/build/src/lib/*.c
53
54 REM
55 REM run a fourth job
56 REM
57 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\four-jobs-test.4.bscr >tmp\bconcmds
58
59 CALL scripts\functions run_bconsole
60 CALL scripts\functions check_for_zombie_jobs storage=File
61
62 ECHO Backup 4 done
63 REM 
64 REM now do several restores to ensure we cleanup between jobs
65 REM
66 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\four-jobs-test.5.bscr >tmp\bconcmds
67
68 CALL scripts\functions run_bconsole
69 CALL scripts\functions check_for_zombie_jobs storage=File
70 CALL scripts\functions stop_bacula
71
72 CALL scripts\functions check_two_logs
73 CALL scripts\functions check_restore_diff
74 CALL scripts\functions end_test