summaryrefslogtreecommitdiffstats
path: root/windows/hl
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-10-22 21:24:15 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-10-22 21:24:15 (GMT)
commit5e4ca646167c821631ccd5912719e4284b6dc89d (patch)
tree64ea8aafb2e9fdb3e1cd58bec497344104859b6d /windows/hl
parent5f87e53d049995a3664e2d364919838a6ffe7e61 (diff)
downloadhdf5-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/hl')
-rw-r--r--windows/hl/c++/test/checkhlcpptests.bat20
-rw-r--r--windows/hl/fortran/test/checkhlfortrantests.bat20
-rw-r--r--windows/hl/test/checkhltests.bat20
3 files changed, 48 insertions, 12 deletions
diff --git a/windows/hl/c++/test/checkhlcpptests.bat b/windows/hl/c++/test/checkhlcpptests.bat
index 24b7f55..aaa8fe2 100644
--- a/windows/hl/c++/test/checkhlcpptests.bat
+++ b/windows/hl/c++/test/checkhlcpptests.bat
@@ -22,6 +22,8 @@ rem
setlocal enabledelayedexpansion
pushd %~dp0
+set /a nerrors=0
+
rem Clean any variables starting with "HDF5_HLCPPTEST_", as we use these for our
rem tests. Also clear "HDF5_HLCPPTEST_TESTS", as we will be addding all of our tests
rem to this variable.
@@ -61,12 +63,16 @@ rem %2 - "dll" or nothing
rem Only add our parameters for batch scripts.
call !hdf5_hlcpptest_%%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.
+ echo.************************************
+ echo. Testing %%a ^(%1 %2^) FAILED
+ exit /b 1
+ )
)
rem If we get here, that means all of our tests passed.
- echo.All HL C++ library tests passed.
-
exit /b
@@ -82,6 +88,12 @@ rem on it for sending parameters. --SJW 9/6/07
rem Run the tests, passing in which version to run
call :run_tests %*
+ if "%nerrors%"=="0" (
+ echo.All HL C++ library tests passed.
+ ) else (
+ echo.** FAILED HL C++ Library tests.
+ )
+
popd
- endlocal & exit /b
+ endlocal & exit /b %nerrors%
\ No newline at end of file
diff --git a/windows/hl/fortran/test/checkhlfortrantests.bat b/windows/hl/fortran/test/checkhlfortrantests.bat
index 98d9c38..28d4822 100644
--- a/windows/hl/fortran/test/checkhlfortrantests.bat
+++ b/windows/hl/fortran/test/checkhlfortrantests.bat
@@ -22,6 +22,8 @@ rem
setlocal enabledelayedexpansion
pushd %~dp0
+set /a nerrors=0
+
rem Clean any variables starting with "HDF5_HLFORTTEST_", as we use these for our
rem tests. Also clear "HDF5_HLFORTTEST_TESTS", as we will be addding all of our tests
rem to this variable.
@@ -61,12 +63,16 @@ rem %2 - "dll" or nothing
rem Only add our parameters for batch scripts.
call !hdf5_hlforttest_%%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.
+ echo.************************************
+ echo. Testing %%a ^(%1 %2^) FAILED
+ exit /b 1
+ )
)
rem If we get here, that means all of our tests passed.
- echo.All HL Fortran library tests passed.
-
exit /b
@@ -84,6 +90,12 @@ rem on it for sending parameters. --SJW 9/6/07
rem Run the tests, passing in which version to run
call :run_tests %*
+ if "%nerrors%"=="0" (
+ echo.All HL Fortran library tests passed.
+ ) else (
+ echo.** FAILED HL Fortran Library tests.
+ )
+
popd
- endlocal & exit /b
+ endlocal & exit /b %nerrors%
\ No newline at end of file
diff --git a/windows/hl/test/checkhltests.bat b/windows/hl/test/checkhltests.bat
index 925c245..0804148 100644
--- a/windows/hl/test/checkhltests.bat
+++ b/windows/hl/test/checkhltests.bat
@@ -22,6 +22,8 @@ rem
setlocal enabledelayedexpansion
pushd %~dp0
+set /a nerrors=0
+
rem Clean any variables starting with "HDF5_HLTEST_", as we use these for our
rem tests. Also clear "HDF5_HLTEST_TESTS", as we will be addding all of our tests
rem to this variable.
@@ -66,12 +68,16 @@ rem %2 - "dll" or nothing
rem Only add our parameters for batch scripts.
call !hdf5_hltest_%%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.
+ echo.************************************
+ echo. Testing %%a ^(%1 %2^) FAILED
+ exit /b 1
+ )
)
rem If we get here, that means all of our tests passed.
- echo.All HL library tests passed.
-
exit /b
@@ -134,6 +140,12 @@ rem on it for sending parameters. --SJW 9/6/07
rem Run the tests, passing in which version to run
call :run_tests %*
+ if "%nerrors%"=="0" (
+ echo.All HL library tests passed.
+ ) else (
+ echo.** FAILED HL Library tests.
+ )
+
popd
- endlocal & exit /b
+ endlocal & exit /b %nerrors%
\ No newline at end of file