3 REM Makefile for Bacula regression testing
5 REM Note, Makefile is built from Makefile.in, which you should not really
6 REM need to change, by invoking:
8 REM config <user's configuration>
16 IF EXIST config_var.cmd GOTO :already_configured
17 ECHO You must run config first and supply the name of your conf file.
18 ECHO Use prototype.conf as a template.
23 SET PATH=%PATH%;%CD%\bin;%CD%\tools
25 REM suck in user's configuration
28 IF EXIST "%BACULA_SOURCE%\configure" GOTO :source_ok
29 ECHO Unable to access the Bacula source in %BACULA_SOURCE%. Update
30 ECHO BACULA_SOURCE in your configuration file and rerun config.
34 IF "%1" == "setup" GOTO :setup
35 IF "%1" == "bacula" GOTO :bacula
36 IF "%1" == "sed" GOTO :sed
37 IF "%1" == "test" GOTO :test
38 IF "%1" == "full_test" GOTO :full_test
39 IF "%1" == "root_test" GOTO :root_test
40 IF "%1" == "clean" GOTO :clean
41 IF "%1" == "reset" GOTO :reset
42 IF "%1" == "distclean" GOTO :distclean
46 ) ELSE IF EXIST "%1.cmd" (
48 ) ELSE IF EXIST tests\%1 (
50 ) ELSE IF EXIST tests\%1.cmd (
53 ECHO Unsupported option: %1
54 ECHO Valid options are:
55 ECHO setup, bacula, sed, test, full_test, root_test, clean, reset, distclean
65 RD /s /q build bin weird-files tmp working 2>nul
68 IF "%BUILD_TYPE%"=="" SET BUILD_TYPE=release
69 ECHO Doing: scripts\setup "%BACULA_SOURCE%" %BUILD_TYPE% %EMAIL% %SMTP_HOST% %TAPE_DRIVE% %AUTOCHANGER% %AUTOCHANGER_PATH% %TAPE_DRIVE1%
70 CALL scripts\setup "%BACULA_SOURCE%" %BUILD_TYPE% %EMAIL% %SMTP_HOST% %TAPE_DRIVE% %AUTOCHANGER% %AUTOCHANGER_PATH% %TAPE_DRIVE1%
74 ECHO Doing: scripts\do_sed %EMAIL% %SMTP_HOST% %TAPE_DRIVE% %AUTOCHANGER% %AUTOCHANGER_PATH% %TAPE_DRIVE1%
75 CALL scripts\do_sed %EMAIL% %SMTP_HOST% %TAPE_DRIVE% %AUTOCHANGER% %AUTOCHANGER_PATH% %TAPE_DRIVE1%
79 REM Run all non-root userid tests
80 CALL all-non-root-tests
84 REM run all file and tape tests
85 CALL all-tape-and-file-tests
89 REM These tests require you to run as root
95 DEL \tmp\file-list tmp\* working\* test.out diff >nul 2>&1
96 DEL 1 2 3 scripts\1 scripts\2 scripts\3 tests\1 tests\2 tests\3 >nul 2>&1
101 REM Reset our userid after running as root
103 DEL \tmp\file-list tmp\file-list
108 RD /s /q bin build weird-files weird-files weird-files2 tmp working 2>nul