]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/six-vol-test.cmd
Copy trunk regress into Branch
[bacula/bacula] / regress / win32 / tests / six-vol-test.cmd
1 REM
2 REM Create a 60MB file with random bytes. Back it up to 6 Volumes
3 REM   each constrained to 10MB using the automatic labeling feature.
4 REM
5 SET TestName=six-vol-test
6 SET JobName=SixVol
7
8 CALL scripts\functions set_debug 0
9
10 CALL scripts\cleanup
11 CALL scripts\copy-testa-confs >nul 2>&1
12 ECHO %CD:\=/%/tmp/largefile >\tmp\file-list
13
14 ECHO Creating a 60MB file with bacula-dir data ...
15 tools\dd if=bin/bacula-dir.exe of=%CD:\=/%/tmp/1 bs=1024 count=500 >nul 2>&1
16 COPY /b %CD%\tmp\1+%CD%\tmp\1+%CD%\tmp\1+%CD%\tmp\1+%CD%\tmp\1 %CD%\tmp\2 >nul 2>&1
17 DEL %CD%\tmp\1
18 COPY /b %CD%\tmp\2+%CD%\tmp\2 %CD%\tmp\3 >nul 2>&1
19 DEL %CD%\tmp\2
20 COPY /b %CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3 %CD%\tmp\4 >nul 2>&1
21 COPY /b %CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\3+%CD%\tmp\4 %CD%\tmp\largefile >nul 2>&1
22 DEL %CD%\tmp\3 %CD%\tmp\4
23
24 CALL scripts\functions change_jobname MultiVol %JobName%
25 CALL scripts\functions start_test
26
27 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\six-vol-test.bscr >tmp\bconcmds
28
29 CALL scripts\functions run_bacula
30 CALL scripts\functions check_for_zombie_jobs storage=File
31 CALL scripts\functions stop_bacula
32
33 CALL scripts\functions check_two_logs
34 diff tmp\largefile  tmp\bacula-restores\%CD::=%\tmp\largefile >nul 2>&1
35 SET dstat=%ERRORLEVEL%
36 CALL scripts\functions end_test