diff options
Diffstat (limited to 'windows')
-rw-r--r-- | windows/tools/h5repack/h5repack.bat | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/windows/tools/h5repack/h5repack.bat b/windows/tools/h5repack/h5repack.bat index 27c1c12..92f5300 100644 --- a/windows/tools/h5repack/h5repack.bat +++ b/windows/tools/h5repack/h5repack.bat @@ -64,6 +64,8 @@ set file13=h5repack_soffset.h5 rem A file with an older version of the layout message (copy of test/tlayouto.h5)
set file14=h5repack_layouto.h5
set file15=h5repack_named_dtypes.h5
+rem located in common testfiles folder
+set file16=tfamilyPERCENT05d.h5
set nerrors=0
@@ -84,7 +86,9 @@ rem set test_msg=!test_msg! %%~nxa
) )
)
- set test_msg=!test_msg!
+ rem We need to replace PERCENT here with "%" for tests that use a percent
+ rem sign. --SJW 5/12/08
+ set test_msg=!test_msg:PERCENT=%%!
echo.%test_msg:~0,69% %1
exit /b
@@ -101,7 +105,9 @@ rem set test_msg=!test_msg! %%~nxa
) )
)
- set test_msg=!test_msg!
+ rem We need to replace PERCENT here with "%" for tests that use a percent
+ rem sign. --SJW 5/12/08
+ set test_msg=!test_msg:PERCENT=%%!
echo.%test_msg:~0,69% %1
exit /b
@@ -117,7 +123,8 @@ rem was unavailable) rem Call the h5diff tool
rem
:difftest
- %h5diff_bin% -q %*
+ set params=%*
+ %h5diff_bin% -q !params:PERCENT=%%!
if %errorlevel% neq 0 (
call :verify *FAILED* %*
set /a nerrors=!nerrors!+1
@@ -195,6 +202,40 @@ rem exit /b
+rem same as TOOLTEST, but it uses the common testfiles at $srcdir/../testfiles/
+rem used to test the family driver, where these files reside
+rem
+:tooltest1
+
+ rem Run test.
+ set infile=%CD%\..\testfiles\%1
+ rem Linux uses a $path variable here, but it is unneccessary, and will
+ rem corrupt our Windows PATH if we use it. --SJW 8/28/07
+ rem set path=%CD%
+ rem set outfile=%path%\out.%1
+ set outfile=%CD%\out.%1
+
+ rem We define %params% here because Windows `shift` command doesn't affect
+ rem the %* variable. --SJW 8/28/07
+ if "%2"=="" (
+ set params=
+ ) else (
+ set params=%*
+ set params=!params:* =!
+ )
+ %h5repack_bin% %params% !infile:PERCENT=%%! !outfile:PERCENT=%%!
+
+ if %errorlevel% neq 0 (
+ call :testing *FAILED* %*
+ set /a nerrors=!nerrors!+1
+ ) else (
+ call :testing PASSED %*
+ call :difftest %infile% %outfile%
+ )
+ del /f !outfile:PERCENT=%%!
+
+ exit /b
+
rem This is a Windows-specific function that detects if the filter passed
rem should be enabled for this test script. It searches H5pubconf.h for the
@@ -610,6 +651,9 @@ rem rem Check repacking file with committed datatypes in odd configurations
call :tooltest %file15%
+ rem tests family driver (file is located in common testfiles folder, uses TOOLTEST1
+ call :tooltest1 %file16%
+
if %nerrors% equ 0 (
echo.All %h5repack% tests passed.
|