]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/incremental-test.cmd
Updates
[bacula/bacula] / regress / win32 / tests / incremental-test.cmd
1 REM
2 REM Run a simple backup of the Bacula build directory then create some           
3 REM   new files, do an Incremental and restore those two files.
4 REM
5 SET TestName=incremental-test
6 SET JobName=Incremental 
7
8 CALL scripts\functions set_debug 0
9 CALL scripts\functions copy_test_confs
10
11 ECHO %CD:\=/%/tmp/build>/tmp/file-list
12
13 MKDIR tmp\build
14 COPY build\src\dird\*.c tmp\build >nul 2>&1
15
16 ECHO %CD:\=/%/tmp/build/ficheriro1.txt>tmp\restore-list
17 ECHO %CD:\=/%/tmp/build/ficheriro2.txt>>tmp\restore-list
18
19 CALL scripts\functions change_jobname CompressedTest %JobName%
20 CALL scripts\functions start_test
21
22 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.1.bscr >tmp\bconcmds
23
24 CALL scripts\functions run_bacula
25 CALL scripts\functions check_for_zombie_jobs storage=File
26 REM
27 REM Now create two new files to be restored later
28 REM
29 bin\bsleep 1
30 ECHO ficheriro1.txt >tmp\build\ficheriro1.txt
31 COPY tmp\build\dird.c tmp\build\ficheriro2.txt >nul 2>&1
32
33 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.2.bscr >tmp\bconcmds
34
35 CALL scripts\functions run_bconsole
36
37 bin\bsleep 1
38 touch tmp\build\ficheriro1.txt
39 touch tmp\build\ficheriro2.txt
40
41 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.3.bscr >tmp\bconcmds
42
43 CALL scripts\functions run_bconsole
44
45 bin\bsleep 1
46
47 COPY tmp\build\ficheriro2.txt tmp\build\1 >nul 2>&1
48 sed -e "s;a;b;g" tmp\build\1 >tmp\build\ficheriro2.txt
49 DEL tmp\build\1
50
51 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.4.bscr >tmp\bconcmds
52
53 CALL scripts\functions run_bconsole
54
55 bin\bsleep 1
56 touch tmp\build\ficheriro1.txt
57 touch tmp\build\ficheriro2.txt
58 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.3.bscr >tmp\bconcmds
59
60 CALL scripts\functions run_bconsole
61
62 bin\bsleep 1
63 touch tmp\build\ficheriro1.txt
64 touch tmp\build\ficheriro2.txt
65 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.3.bscr >tmp\bconcmds
66
67 CALL scripts\functions run_bconsole
68
69 bin\bsleep 1
70 touch tmp\build\ficheriro1.txt
71 touch tmp\build\ficheriro2.txt
72 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.3.bscr >tmp\bconcmds
73
74 CALL scripts\functions run_bconsole
75 bin\bsleep 1
76 touch tmp\build\ficheriro1.txt
77 touch tmp\build\ficheriro2.txt
78
79 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-test.5.bscr >tmp\bconcmds
80
81 CALL scripts\functions run_bconsole
82 CALL scripts\functions check_for_zombie_jobs storage=File
83 CALL scripts\functions stop_bacula
84
85 CALL scripts\functions check_two_logs
86 REM
87 REM Delete .c files because we will only restored the txt files
88 REM
89 DEL tmp\build\*.c
90 CALL scripts\functions check_restore_tmp_build_diff
91 CALL scripts\functions end_test