]> git.sur5r.net Git - bacula/bacula/blob - regress/win32/tests/restore2-by-file-test.cmd
Delete unwanted subdirectory
[bacula/bacula] / regress / win32 / tests / restore2-by-file-test.cmd
1 REM
2 REM Run a simple backup of the Bacula build directory using the compressed option
3 REM   then restore a few selected files.
4 REM
5 SETLOCAL ENABLEDELAYEDEXPANSION
6 SET TestName=restore2-by-file-test
7 SET JobName=restore2byfile
8
9 CALL scripts\functions set_debug 0
10 CALL scripts\functions copy_test_confs
11
12 ECHO %CD:\=/%/build >\tmp\file-list
13 sed -e "s;^;%CD:\=/%;" scripts/flist >tmp\restore2-list
14
15 CALL scripts\functions change_jobname CompressedTest %JobName%
16 CALL scripts\functions start_test
17
18 sed -e "s;@JobName@;%JobName%;g" -e "s;@out@;%out%;g" -e "s;@topdir@;%CD:\=/%;g" tests\restore2-by-file-test.bscr >tmp\bconcmds
19
20 CALL scripts\functions run_bacula
21 CALL scripts\functions check_for_zombie_jobs storage=File
22 CALL scripts\functions stop_bacula
23
24 CALL scripts\functions check_two_logs
25 SET dstat=0
26 FOR /f %%i IN ( tmp\restore2-list ) DO (
27    SET SUBDIR=%%i
28    diff %%i tmp/bacula-restores/!SUBDIR::=!
29    IF %ERRORLEVEL% NEQ 0 SET dstat=1
30 )
31 CALL scripts\functions end_test