diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-10-22 21:24:15 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-10-22 21:24:15 (GMT) |
commit | 5e4ca646167c821631ccd5912719e4284b6dc89d (patch) | |
tree | 64ea8aafb2e9fdb3e1cd58bec497344104859b6d /windows/hdf5check.BAT | |
parent | 5f87e53d049995a3664e2d364919838a6ffe7e61 (diff) | |
download | hdf5-5e4ca646167c821631ccd5912719e4284b6dc89d.zip hdf5-5e4ca646167c821631ccd5912719e4284b6dc89d.tar.gz hdf5-5e4ca646167c821631ccd5912719e4284b6dc89d.tar.bz2 |
[svn-r17727] Updated the errorlevel checking for better error handling in the windows batch files.
Diffstat (limited to 'windows/hdf5check.BAT')
-rwxr-xr-x | windows/hdf5check.BAT | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/windows/hdf5check.BAT b/windows/hdf5check.BAT index f3caea2..dc0bb70 100755 --- a/windows/hdf5check.BAT +++ b/windows/hdf5check.BAT @@ -75,14 +75,19 @@ rem %2 - "dll" or nothing :run_tests
for %%a in (%hdf5_test_tests%) do (
echo.
- echo.************************************
+ echo.**==**==**==**==**==**==**==**==**==**
echo. Testing %%a ^(%1 %2^)
- echo.************************************
+ echo.**==**==**==**==**==**==**==**==**==**
rem Only add our parameters for batch scripts.
call !hdf5_test_%%a_test:.bat= %1 %2!
rem Exit early if test fails.
- if !errorlevel! neq 0 exit /b
+ if errorlevel 1 (
+ set /a nerrors=!nerrors!+1
+ echo. Testing %%a ^(%1 %2^) FAILED
+ echo.**==**==**==**==**==**==**==**==**==**
+ exit /b 1
+ )
)
rem If we get here, that means all of our tests passed.
@@ -118,6 +123,7 @@ rem on it for sending parameters. --SJW 9/6/07 rem We use "nodll" here because we cannot simply leave it blank. Filter
rem it out below. --SJW 9/10/07
for %%b in (nodll dll) do (
+ echo.======================================
for %%a in (debug release) do (
set hdf5_config=%%a %%b
call :run_tests !hdf5_config:nodll=!
@@ -125,11 +131,14 @@ rem on it for sending parameters. --SJW 9/6/07 set /a nerrors=!nerrors!+1
)
)
+ echo.======================================
)
- if %nerrors% equ 0 (
+ if "%nerrors%"=="0" (
echo.HDF5 Tests passed for all configurations!
- )
+ ) else (
+ echo.** FAILED HDF5 Tests!
+ )
popd
endlocal & exit /b %nerrors%
|