diff options
author | Scott Wegner <swegner@hdfgroup.org> | 2007-09-10 19:14:08 (GMT) |
---|---|---|
committer | Scott Wegner <swegner@hdfgroup.org> | 2007-09-10 19:14:08 (GMT) |
commit | 43bb1ba8e53c3eb23448baba68485222514ab992 (patch) | |
tree | e32be74f0faad61cb3c3b29ead9849be5dc59a4d /windows/hl/c++ | |
parent | 33efca34cb30bcf7e17f6e3aa580233bd58a0075 (diff) | |
download | hdf5-43bb1ba8e53c3eb23448baba68485222514ab992.zip hdf5-43bb1ba8e53c3eb23448baba68485222514ab992.tar.gz hdf5-43bb1ba8e53c3eb23448baba68485222514ab992.tar.bz2 |
[svn-r14138]
Diffstat (limited to 'windows/hl/c++')
-rw-r--r-- | windows/hl/c++/test/checkhlcpptests.bat | 87 | ||||
-rwxr-xr-x | windows/hl/c++/test/test_hdf5_hl_cpp.bat | 24 |
2 files changed, 87 insertions, 24 deletions
diff --git a/windows/hl/c++/test/checkhlcpptests.bat b/windows/hl/c++/test/checkhlcpptests.bat new file mode 100644 index 0000000..24b7f55 --- /dev/null +++ b/windows/hl/c++/test/checkhlcpptests.bat @@ -0,0 +1,87 @@ +@echo off
+rem
+rem Copyright by The HDF Group.
+rem Copyright by the Board of Trustees of the University of Illinois.
+rem All rights reserved.
+rem
+rem This file is part of HDF5. The full HDF5 copyright notice, including
+rem terms governing use, modification, and redistribution, is contained in
+rem the files COPYING and Copyright.html. COPYING can be found at the root
+rem of the source code distribution tree; Copyright.html can be found at the
+rem root level of an installed copy of the electronic HDF5 document set and
+rem is linked from the top-level documents page. It can also be found at
+rem http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+rem access to either file, you may request a copy from help@hdfgroup.org.
+rem
+rem Tests for the hdf5 hl c++ library
+rem
+rem Created: Scott Wegner, 9/7/07
+rem Modified:
+rem
+
+setlocal enabledelayedexpansion
+pushd %~dp0
+
+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.
+rem Set at least one variable in set beforehand to avoid error message.
+rem --SJW 9/5/07
+set hdf5_hlcpptest_=foo
+for /f "tokens=1 delims==" %%a in ('set hdf5_hlcpptest_') do set %%a=
+set hdf5_hlcpptest_tests=
+
+goto main
+
+
+rem Function to add a test to the test suite.
+rem Expects the following parameters:
+rem %1 - Name of the hlcpptest being tested
+rem %2 - Relative path of script
+:add_test
+
+ set hdf5_hlcpptest_tests=%hdf5_hlcpptest_tests% %1
+ set hdf5_hlcpptest_%1_test=%CD%\%2\%1
+
+ exit /b
+
+
+rem Run all of the tests that have been added to the suite. Print a header
+rem at the beginning of each one. Short-circuit if a test fails.
+rem Expects the following parameters:
+rem %1 - release or debug version
+rem %2 - "dll" or nothing
+:run_tests
+ for %%a in (%hdf5_hlcpptest_tests%) do (
+ echo.
+ echo.************************************
+ echo. Testing %%a ^(%1 %2^)
+ echo.************************************
+
+ 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
+ )
+
+ rem If we get here, that means all of our tests passed.
+ echo.All HL C++ library tests passed.
+
+ exit /b
+
+
+rem This is where we add tests to the suite, and run them all at the end.
+rem Make sure only to run dll versions of tests you build dll for
+rem Also make sure to add *.bat to batch scripts, as the above functions rely
+rem on it for sending parameters. --SJW 9/6/07
+:main
+
+ call :add_test hl_test_table_cpp%2 .\hl_test_table_cpp%2\%1
+
+
+ rem Run the tests, passing in which version to run
+ call :run_tests %*
+
+ popd
+ endlocal & exit /b
+
\ No newline at end of file diff --git a/windows/hl/c++/test/test_hdf5_hl_cpp.bat b/windows/hl/c++/test/test_hdf5_hl_cpp.bat deleted file mode 100755 index bf9b70c..0000000 --- a/windows/hl/c++/test/test_hdf5_hl_cpp.bat +++ /dev/null @@ -1,24 +0,0 @@ -@REM Copyright by The HDF Group.
-@REM Copyright by the Board of Trustees of the University of Illinois.
-@REM All rights reserved.
-@REM
-@REM This file is part of HDF5. The full HDF5 copyright notice, including
-@REM terms governing use, modification, and redistribution, is contained in
-@REM the files COPYING and Copyright.html. COPYING can be found at the root
-@REM of the source code distribution tree; Copyright.html can be found at the
-@REM root level of an installed copy of the electronic HDF5 document set and
-@REM is linked from the top-level documents page. It can also be found at
-@REM http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-@REM access to either file, you may request a copy from help@hdfgroup.org.
-
-@ECHO OFF
-
-@REM This batch file will be used to test HDF5 High Level C++ Library.
-@REM By Fang GUO
-@REM Created on: 05/27/2005
-
-echo.
-echo ===============================================
-echo Testing hl_test_table_cpp%2 -- %1
-echo ===============================================
-hl_test_table_cpp%2\%1\hl_test_table_cpp%2
\ No newline at end of file |