2 REM Run a simple backup of the Bacula build directory then create some
3 REM new files, do a differential and restore those two files.
5 SET TestName=differential-test
6 SET JobName=differential
8 CALL scripts\functions set_debug 0
9 CALL scripts\functions copy_test_confs
11 ECHO %CD:\=/%/tmp/build >\tmp\file-list
13 COPY build\src\dird\*.c tmp\build >nul 2>&1
15 ECHO %CD:\=/%/tmp/build/ficheriro1.txt>tmp\restore-list
16 ECHO %CD:\=/%/tmp/build/ficheriro2.txt>>tmp\restore-list
18 CALL scripts\functions change_jobname CompressedTest %JobName%
19 CALL scripts\functions start_test
21 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\differential-test.1.bscr >tmp\bconcmds
23 CALL scripts\functions run_bacula
24 CALL scripts\functions check_for_zombie_jobs storage=File
26 ECHO ficheriro1.txt >tmp\build\ficheriro1.txt
27 ECHO ficheriro2.txt >tmp\build\ficheriro2.txt
29 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\differential-test.2.bscr >tmp\bconcmds
31 CALL scripts\functions run_bconsole
33 CALL scripts\functions check_for_zombie_jobs storage=File
34 ECHO ficheriro2.txt >tmp\build\ficheriro2.txt
36 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\differential-test.3.bscr >tmp\bconcmds
38 CALL scripts\functions run_bconsole
39 CALL scripts\functions check_for_zombie_jobs storage=File
40 CALL scripts\functions stop_bacula
42 CALL scripts\functions check_two_logs
44 REM Delete .c files because we will only restore the txt files
47 CALL scripts\functions check_restore_tmp_build_diff
48 CALL scripts\functions end_test