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.
6 SET TestName=four-jobs-test
9 CALL scripts\functions set_debug 0
10 CALL scripts\functions copy_test_confs
12 ECHO %CD:\=/%/build >${cwd}/tmp/file-list
14 CALL scripts\functions change_jobname CompressedTest %JobName%
15 CALL scripts\functions start_test
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
19 CALL scripts\functions run_bacula
20 CALL scripts\functions check_for_zombie_jobs storage=File
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
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
33 CALL scripts\functions run_bconsole
34 CALL scripts\functions check_for_zombie_jobs storage=File
38 tools\touch %CD:\=/%/build/src/dird/*.c
39 tools\touch %CD:\=/%/build/src/lib/*.c
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
46 CALL scripts\functions run_bconsole
47 CALL scripts\functions check_for_zombie_jobs storage=File
51 REM make some files for the incremental to pick up
52 tools\touch %CD:\=/%/build/src/lib/*.c
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
59 CALL scripts\functions run_bconsole
60 CALL scripts\functions check_for_zombie_jobs storage=File
64 REM now do several restores to ensure we cleanup between jobs
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
68 CALL scripts\functions run_bconsole
69 CALL scripts\functions check_for_zombie_jobs storage=File
70 CALL scripts\functions stop_bacula
72 CALL scripts\functions check_two_logs
73 CALL scripts\functions check_restore_diff
74 CALL scripts\functions end_test