]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/incremental-2tape.cmd
Add Windows port of the regression tests.
[bacula/bacula] / regress / win32 / tests / incremental-2tape.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 REM This script uses the autochanger and two tapes
6 REM
7 SET TestName=incremental-2tape
8 SET JobName=inctwotape
9 CALL scripts\functions set_debug 0
10
11 CALL config_out
12 IF "%AUTOCHANGER%" == "nul" (
13    ECHO incremental-2tape test skipped. No autochanger.
14    EXIT
15 )
16
17 CALL scripts\functions stop_bacula
18 CALL drop_bacula_tables >nul 2>&1
19 CALL make_bacula_tables >nul 2>&1
20 CALL grant_bacula_privileges >nul 2>&1
21
22 CALL scripts\copy-2tape-confs
23 CALL scripts\cleanup-2tape
24 ECHO %CD:\=/%/tmp/build >\tmp\file-list
25 IF NOT EXIST tmp\build MKDIR tmp\build
26 COPY build\src\dird\*.c tmp\build
27 ECHO %CD:\=/%/tmp/build/ficheriro1.txt>tmp\restore-list
28 ECHO %CD:\=/%/tmp/build/ficheriro2.txt>>tmp\restore-list
29
30 CALL scripts\functions start_test
31
32 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2tape.1.bscr >tmp\bconcmds
33
34 CALL scripts\functions run_bacula
35
36 ECHO ficheriro1.txt >tmp\build\ficheriro1.txt
37 ECHO ficheriro2.txt >tmp\build\ficheriro2.txt
38
39 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\incremental-2tape.2.bscr >tmp\bconcmds
40 CALL scripts\functions run_bconsole
41 CALL scripts\bacula stop_bacula
42 CALL scripts\bacula check_two_logs
43 REM
44 REM Delete .c files because we will only restore the txt files
45 REM
46 DEL tmp\build\*.c
47 CALL scripts\bacula check_restore_tmp_build_diff
48 CALL scripts\bacula end_test