summaryrefslogtreecommitdiff
path: root/Chalice/tests/test-scripts/getboogieoutput.bat
blob: 76af1fcfbcea51f86180b5a4b3c3ffefa4fcfbc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
set chalice="%~dp0\..\..\chalice.bat"
set getparams="%~dp0\getparams.bat"

set output="%1.output.txt"

:: get parameters
set chaliceparameters=
setlocal EnableDelayedExpansion
set done=0
set key=a
FOR /F "usebackq tokens=1,2 delims==" %%i in (%1.chalice) do (
    
    if !done!==0 (
        set key=%%i
        set param=%%j
    )
    
    set done=1
)
set str=// chalice-parameter
if "!key!"=="!str!" (
    set chaliceparameters=!param!
)

echo Verification of %1.chalice using parameters="%chaliceparameters%" > %output%
echo.>> %output%
call %chalice% "%1.chalice" -smoke -time:0 %chaliceparameters% %2 %3 %4 %5 %6 %7 >> %output% 2>&1

set o=%~dp1%out.bpl
if exist "%o%" copy "%o%" "%1.bpl">nul
if exist "%o%" del "%~dp1%out.bpl"
goto :eof