2 |
|
REM Test suite Configuration parameters (FPCDIR and FPCBIN) |
3 |
|
REM These may be modified if needed to suite local requirements |
4 |
|
|
5 |
< |
FOR %%V in (3.0.4 3.0.2 3.0.0) do ( |
5 |
> |
FOR %%V in (3.2.0 3.0.4 3.0.2 3.0.0) do ( |
6 |
|
if EXIST C:\lazarus\fpc\%%V\bin\i386-win32\fpc.exe ( |
7 |
|
set FPCDIR=C:\lazarus\fpc\%%V |
8 |
|
set FPCBIN=C:\lazarus\fpc\%%V\bin\i386-win32 |
13 |
|
set FPCBIN=C:\lazarus\fpc\%%V\bin\x86_64-win32 |
14 |
|
Goto COMPILE |
15 |
|
) |
16 |
+ |
if EXIST C:\lazarus\fpc\%%V\bin\x86_64-win64\fpc.exe ( |
17 |
+ |
set FPCDIR=C:\lazarus\fpc\%%V |
18 |
+ |
set FPCBIN=C:\lazarus\fpc\%%V\bin\x86_64-win64 |
19 |
+ |
Goto COMPILE |
20 |
+ |
) |
21 |
|
) |
22 |
|
|
23 |
|
if not EXIST %FPCBIN%\fpc.exe ( |
29 |
|
set TESTOUTDIR=%TEMP%\fbintf-testsuite |
30 |
|
set USERNAME=SYSDBA |
31 |
|
set PASSWORD=masterkey |
32 |
< |
set EMPLOYEEDB=localhost:employee |
33 |
< |
set NEWDBNAME=localhost:%TESTOUTDIR%\testsuite1.fdb |
34 |
< |
set NEWDBNAME2=localhost:%TESTOUTDIR%\testsuite2.fdb |
32 |
> |
set EMPLOYEEDB=employee |
33 |
> |
set NEWDBNAME=%TESTOUTDIR%\testsuite1.fdb |
34 |
> |
set NEWDBNAME2=%TESTOUTDIR%\testsuite2.fdb |
35 |
|
set BAKFILE=%TESTOUTDIR%\testsuite.gbk |
36 |
+ |
set DIFF=%FPCBIN%\diff.exe |
37 |
|
|
38 |
|
rd /s /q testunits |
39 |
|
mkdir %TESTOUTDIR% |
45 |
|
echo( |
46 |
|
IF EXIST "testsuite.exe" ( |
47 |
|
testsuite.exe -u %USERNAME% -p %PASSWORD% -e %EMPLOYEEDB% -n %NEWDBNAME% -s %NEWDBNAME2% -b %BAKFILE% -o testout.log %1 |
48 |
+ |
|
49 |
+ |
if not EXIST "%DIFF%" ( |
50 |
+ |
echo Unable to compare results - diff not found - %DIFF% |
51 |
+ |
goto :EOF |
52 |
+ |
) |
53 |
+ |
|
54 |
|
echo Comparing results with reference log |
55 |
|
echo( |
56 |
< |
%FPCBIN%\diff reference.log testout.log >diff.log |
57 |
< |
type diff.log |
56 |
> |
findstr /C:"ODS Major Version = 11" testout.log |
57 |
> |
IF ERRORLEVEL 1 ( |
58 |
> |
%DIFF% FB3reference.log testout.log >diff.log |
59 |
> |
) ELSE ( |
60 |
> |
%DIFF% FB2reference.log testout.log >diff.log |
61 |
> |
) |
62 |
> |
type diff.log |
63 |
|
rd /s /q testunits |
64 |
|
del testsuite.exe |
65 |
|
) |