-
Notifications
You must be signed in to change notification settings - Fork 44
/
runValidationTests.bat
executable file
·46 lines (44 loc) · 967 Bytes
/
runValidationTests.bat
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
34
35
36
37
38
39
40
41
42
43
44
45
46
::$Id$
:: Hopsan model validation script
:: This script calls hopsancli to validate models for all hvc files found.
:: Author: Peter Nordin 2012-05-31
@echo off
SETLOCAL EnableDelayedExpansion
set failed=0
set okPause=1
if "%~1"=="nopause" (
set okPause=0
)
for /F "delims==" %%x in ('dir /B /S *.hvc') do (
cd bin
if not exist hopsancli_d.exe (
if not exist hopsancli.exe (
echo hopsancli.exe not found!
set failed=1
)
)
if exist hopsancli_d.exe (
echo "Evaluating with hopsancli_d: %%x"
hopsancli_d.exe -t "%%x"
if ERRORLEVEL 1 set failed=1
)
if exist hopsancli.exe (
echo "Evaluating with hopsancli: %%x"
hopsancli.exe -t "%%x"
if ERRORLEVEL 1 set failed=1
)
cd ..
)
if %failed% EQU 1 (
echo ERROR: There was at least one failure!
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" (
pause
)
exit /B 1
)
if %okPause% EQU 1 (
if "%HOPSAN_BUILD_SCRIPT_NOPAUSE%" == "" (
pause
)
)
exit /B 0