mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-06 17:20:42 +08:00
[svn-r15056] Purpose: Update Windows h5repack test script
Description: Merge changes from 1.8 branch into trunk. New syntax and test added for "old syntax" Tested: VS2005 on WinXP
This commit is contained in:
parent
fcf8a9a2cb
commit
75f21172fb
@ -162,6 +162,40 @@ rem
|
||||
exit /b
|
||||
|
||||
|
||||
rem Call h5repack with old syntax
|
||||
rem
|
||||
:tooltest0
|
||||
|
||||
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% -i %infile% -o %outfile% %params%
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
call :testing *FAILED* %*
|
||||
set /a nerrors=!nerrors!+1
|
||||
) else (
|
||||
call :testing PASSED %*
|
||||
call :difftest %infile% %outfile%
|
||||
)
|
||||
del /f %outfile%
|
||||
|
||||
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
|
||||
rem string "#define H5_HAVE_FILTER_%1" and sets the variable "use_filter_%1"
|
||||
@ -519,8 +553,7 @@ rem
|
||||
call :tooltest %arg%
|
||||
|
||||
|
||||
rem long swtiches. use FILE4=h5repack_layout.h5 (no filters)
|
||||
|
||||
rem latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
|
||||
set arg=%file4% --layout CHUNK=20x10 --filter GZIP=1 --threshold=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]
|
||||
if not "%use_filter_deflate%"=="yes" (
|
||||
call :skip %arg%
|
||||
@ -528,6 +561,14 @@ rem
|
||||
call :tooltest %arg%
|
||||
)
|
||||
|
||||
rem latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
|
||||
set arg=%file4% -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]
|
||||
if not "%use_filter_deflate%"=="yes" (
|
||||
call :skip %arg%
|
||||
) else (
|
||||
call :tooltest %arg%
|
||||
)
|
||||
|
||||
rem several global filters
|
||||
|
||||
set arg=%file4% --filter GZIP=1 --filter SHUF
|
||||
@ -539,6 +580,15 @@ rem
|
||||
call :tooltest %arg%
|
||||
)
|
||||
|
||||
rem syntax of -i infile -o outfile
|
||||
rem latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
|
||||
set arg=%file4% -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]
|
||||
if not "%use_filter_deflate%"=="yes" (
|
||||
call :skip %arg%
|
||||
) else (
|
||||
call :tooltest0 %arg%
|
||||
)
|
||||
|
||||
|
||||
if %nerrors% equ 0 (
|
||||
echo.All %h5repack% tests passed.
|
||||
|
Loading…
x
Reference in New Issue
Block a user