summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-05-21 15:39:29 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-05-21 15:39:29 (GMT)
commit75f21172fb9a12e33fa7461bc7304e3e227c17aa (patch)
tree00413043dc80bd57e19a505e7ccea934f2e455da
parentfcf8a9a2cbdca2dd8e8a7af51961ad9b0729c380 (diff)
downloadhdf5-75f21172fb9a12e33fa7461bc7304e3e227c17aa.zip
hdf5-75f21172fb9a12e33fa7461bc7304e3e227c17aa.tar.gz
hdf5-75f21172fb9a12e33fa7461bc7304e3e227c17aa.tar.bz2
[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
-rw-r--r--windows/tools/h5repack/h5repack.bat54
1 files changed, 52 insertions, 2 deletions
diff --git a/windows/tools/h5repack/h5repack.bat b/windows/tools/h5repack/h5repack.bat
index d06f82c..7454f7f 100644
--- a/windows/tools/h5repack/h5repack.bat
+++ b/windows/tools/h5repack/h5repack.bat
@@ -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.