diff options
Diffstat (limited to 'windows/tools')
-rw-r--r-- | windows/tools/h5diff/testh5diff.bat | 67 | ||||
-rw-r--r-- | windows/tools/h5dump/testh5dump.bat | 83 | ||||
-rw-r--r-- | windows/tools/h5import/h5importtestutil.bat | 27 |
3 files changed, 143 insertions, 34 deletions
diff --git a/windows/tools/h5diff/testh5diff.bat b/windows/tools/h5diff/testh5diff.bat index 9b73b60..491332f 100644 --- a/windows/tools/h5diff/testh5diff.bat +++ b/windows/tools/h5diff/testh5diff.bat @@ -59,6 +59,8 @@ set srcexclude1_2=h5diff_exclude1-2.h5 set srcexclude2_1=h5diff_exclude2-1.h5
set srcexclude2_2=h5diff_exclude2-2.h5
set src_comp_vl_strs=h5diff_comp_vl_strs.h5
+set src_COMPS_ARRAY_VLEN1=compounds_array_vlen1.h5
+set src_COMPS_ARRAY_VLEN2=compounds_array_vlen2.h5
set src_ATTR_VERBOSE_LEVEL_FILE1=h5diff_attr_v_level1.h5
set src_ATTR_VERBOSE_LEVEL_FILE2=h5diff_attr_v_level2.h5
@@ -93,6 +95,8 @@ set exclude1_2=%indir%\h5diff_exclude1-2.h5 set exclude2_1=%indir%\h5diff_exclude2-1.h5
set exclude2_2=%indir%\h5diff_exclude2-2.h5
set comp_vl_strs=%indir%\h5diff_comp_vl_strs.h5
+set COMPS_ARRAY_VLEN1=%indir%\compounds_array_vlen1.h5
+set COMPS_ARRAY_VLEN2=%indir%\compounds_array_vlen2.h5
set ATTR_VERBOSE_LEVEL_FILE1=%indir%\h5diff_attr_v_level1.h5
set ATTR_VERBOSE_LEVEL_FILE2=%indir%\h5diff_attr_v_level2.h5
@@ -297,12 +301,12 @@ rem ############################################################################ call :tooltest h5diff_17.txt -v %file1% %file2%
rem 1.71 test 32-bit INFINITY
- call :testing %h5diff% -v %srcfile1% %srcfile1% /g1/fp19
- call :tooltest h5diff_171.txt -v %file1% %file1% /g1/fp19
+ call :testing %h5diff% -v %srcfile1% %srcfile1% /g1/fp19 /g1/fp19_COPY
+ call :tooltest h5diff_171.txt -v %file1% %file1% /g1/fp19 /g1/fp19_COPY
rem 1.72 test 64-bit INFINITY
- call :testing %h5diff% -v %srcfile1% %srcfile1% /g1/fp20
- call :tooltest h5diff_172.txt -v %file1% %file1% /g1/fp20
+ call :testing %h5diff% -v %srcfile1% %srcfile1% /g1/fp20 /g1/fp20_COPY
+ call :tooltest h5diff_172.txt -v %file1% %file1% /g1/fp20 /g1/fp20_COPY
rem 1.8 quiet mode
call :testing %h5diff% -q %srcfile1% %srcfile2%
@@ -528,6 +532,16 @@ rem ############################################################################ call :testing %h5diff% file1.h6 file2.h6
call :tooltest h5diff_629.txt file1.h6 file2.h6
+ rem ######################################################################
+ rem # NaN
+ rem ######################################################################
+ rem 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO
+ call :testing %h5diff% -v -d "0.0001" %srcfile1% %srcfile1% g1/fp18 g1/fp18_COPY
+ call :tooltest h5diff_630.txt -v -d "0.0001" %file1% %file1% g1/fp18 g1/fp18_COPY
+ call :testing %h5diff% -v --use-system-epsilon %srcfile1% %srcfile1% g1/fp18 g1/fp18_COPY
+ call :tooltest h5diff_631.txt -v --use-system-epsilon %file1% %file1% g1/fp18 g1/fp18_COPY
+
+
rem ########################################################################
rem 7. attributes
rem ########################################################################
@@ -884,9 +898,9 @@ rem ############################################################################ call :tooltest h5diff_518.txt -v --follow-symlinks %grp_recurse1_ext% %grp_recurse2_ext1% /g1
- rem ##############################################################################
+ rem #######################################################################
rem # Exclude objects (--exclude-path)
- rem ##############################################################################
+ rem #######################################################################
rem #-------------------------------------------------
rem # Same structure, same names and different value.
@@ -913,12 +927,45 @@ rem ############################################################################ call :testing %h5diff% -v --exclude-path "/dset3" %srcexclude1_1% %srcexclude1_2% /group1
call :tooltest h5diff_484.txt -v --exclude-path "/dset3" %exclude1_1% %exclude1_2% /group1
- rem ##############################################################################
+ rem #######################################################################
rem # diff various multiple vlen and fixed strings in a compound type dataset
- rem ##############################################################################
- call :testing %h5diff% -v %src_comp_vl_strs% %src_comp_vl_strs%
- call :tooltest h5diff_530.txt -v %comp_vl_strs% %comp_vl_strs%
+ rem #######################################################################
+ call :testing %h5diff% -v %src_comp_vl_strs% %src_comp_vl_strs% /group /group_copy
+ call :tooltest h5diff_530.txt -v %comp_vl_strs% %comp_vl_strs% /group /group_copy
+
+ rem # #####################################################################
+ rem # # Test container types (array,vlen) with multiple nested compound types
+ rem # # Complex compound types in dataset and attribute
+ rem # #####################################################################
+ call :testing %h5diff% -v %src_COMPS_ARRAY_VLEN1% %src_COMPS_ARRAY_VLEN2%
+ call :tooltest h5diff_540.txt -v %COMPS_ARRAY_VLEN1% %COMPS_ARRAY_VLEN2%
+
+ rem #######################################################################
+ rem # Test mutually exclusive options
+ rem #######################################################################
+
+ rem ------------------------------------------------------
+ rem Test with -d , -p and --use-system-epsilon.
+ call :testing %h5diff% -v -d 5 -p 0.05 --use-system-epsilon %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_640.txt -v -d 5 -p 0.05 --use-system-epsilon %file1% %file2% /g1/dset3 /g1/dset4
+
+ call :testing %h5diff% -v -d 5 -p 0.05 %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_641.txt -v -d 5 -p 0.05 %file1% %file2% /g1/dset3 /g1/dset4
+
+ call :testing %h5diff% -v -p 0.05 -d 5 %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_642.txt -v -p 0.05 -d 5 %file1% %file2% /g1/dset3 /g1/dset4
+
+ call :testing %h5diff% -v -d 5 --use-system-epsilon %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_643.txt -v -d 5 --use-system-epsilon %file1% %file2% /g1/dset3 /g1/dset4
+
+ call :testing %h5diff% -v --use-system-epsilon -d 5 %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_644.txt -v --use-system-epsilon -d 5 %file1% %file2% /g1/dset3 /g1/dset4
+
+ call :testing %h5diff% -v -p 0.05 --use-system-epsilon %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_645.txt -v -p 0.05 --use-system-epsilon %file1% %file2% /g1/dset3 /g1/dset4
+ call :testing %h5diff% -v --use-system-epsilon -p 0.05 %srcfile1% %srcfile2% /g1/dset3 /g1/dset4
+ call :tooltest h5diff_646.txt -v --use-system-epsilon -p 0.05 %file1% %file2% /g1/dset3 /g1/dset4
rem #######################################################################
rem # END
diff --git a/windows/tools/h5dump/testh5dump.bat b/windows/tools/h5dump/testh5dump.bat index dff1d1f..307765c 100644 --- a/windows/tools/h5dump/testh5dump.bat +++ b/windows/tools/h5dump/testh5dump.bat @@ -410,7 +410,8 @@ rem ############################################################################ call :tooltest tall-4s.ddl --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5
call :tooltest tall-5s.ddl -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5
call :tooltest tdset-3s.ddl -d "/dset1[1,1;;;]" tdset.h5
-
+ rem block
+ rem call :tooltest tdset2-1s.ddl -d "/dset1[;3,2;4,4;1,4]" tdset2.h5
rem test printing characters in ASCII instead of decimal
call :tooltest tchar1.ddl -r tchar.h5
@@ -614,8 +615,84 @@ rem ############################################################################ rem test for dangling external links call :tooltest textlink.ddl textlink.h5 -
-
+
+ rem test for dataset packed bits
+ rem Set up xCMD to test or skip.
+ rem Limits:
+ rem Maximum number of packed bits is 8 (for now).
+ rem Maximum integer size is 64 (for now).
+ rem Maximun Offset is 63 (Maximum size - 1).
+ rem Maximum Offset+Length is 64 (Maximum size).
+ rem Tests:
+ rem Normal operation on both signed and unsigned int datasets.
+ rem Sanity check
+ rem Their rawdata output should be the same.
+ call :tooltest tpbitsSignedWhole.ddl -d /DS08BITS -M 0,8 packedbits.h5
+ call :tooltest tpbitsUnsignedWhole.ddl -d /DU08BITS -M 0,8 packedbits.h5
+ call :tooltest tpbitsSignedIntWhole.ddl -d /DS16BITS -M 0,16 packedbits.h5
+ call :tooltest tpbitsUnsignedIntWhole.ddl -d /DU16BITS -M 0,16 packedbits.h5
+ call :tooltest tpbitsSignedLongWhole.ddl -d /DS32BITS -M 0,32 packedbits.h5
+ call :tooltest tpbitsUnsignedLongWhole.ddl -d /DU32BITS -M 0,32 packedbits.h5
+ call :tooltest tpbitsSignedLongLongWhole.ddl -d /DS64BITS -M 0,64 packedbits.h5
+ call :tooltest tpbitsUnsignedLongLongWhole.ddl -d /DU64BITS -M 0,64 packedbits.h5
+ call :tooltest tpbitsSignedLongLongWhole63.ddl -d /DS64BITS -M 0,63 packedbits.h5
+ call :tooltest tpbitsUnsignedLongLongWhole63.ddl -d /DU64BITS -M 0,63 packedbits.h5
+ call :tooltest tpbitsSignedLongLongWhole1.ddl -d /DS64BITS -M 1,63 packedbits.h5
+ call :tooltest tpbitsUnsignedLongLongWhole1.ddl -d /DU64BITS -M 1,63 packedbits.h5
+ rem Half sections
+ call :tooltest tpbitsSigned4.ddl -d /DS08BITS -M 0,4,4,4 packedbits.h5
+ call :tooltest tpbitsUnsigned4.ddl -d /DU08BITS -M 0,4,4,4 packedbits.h5
+ call :tooltest tpbitsSignedInt8.ddl -d /DS16BITS -M 0,8,8,8 packedbits.h5
+ call :tooltest tpbitsUnsignedInt8.ddl -d /DU16BITS -M 0,8,8,8 packedbits.h5
+ call :tooltest tpbitsSignedLong16.ddl -d /DS32BITS -M 0,16,16,16 packedbits.h5
+ call :tooltest tpbitsUnsignedLong16.ddl -d /DU32BITS -M 0,16,16,16 packedbits.h5
+ call :tooltest tpbitsSignedLongLong32.ddl -d /DS64BITS -M 0,32,32,32 packedbits.h5
+ call :tooltest tpbitsUnsignedLongLong32.ddl -d /DU64BITS -M 0,32,32,32 packedbits.h5
+ rem Quarter sections
+ call :tooltest tpbitsSigned2.ddl -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
+ call :tooltest tpbitsUnsigned2.ddl -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
+ call :tooltest tpbitsSignedInt4.ddl -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
+ call :tooltest tpbitsUnsignedInt4.ddl -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
+ call :tooltest tpbitsSignedLong8.ddl -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
+ call :tooltest tpbitsUnsignedLong8.ddl -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
+ call :tooltest tpbitsSignedLongLong16.ddl -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
+ call :tooltest tpbitsUnsignedLongLong16.ddl -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
+ rem Begin and End
+ call :tooltest tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5
+ call :tooltest tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5
+ call :tooltest tpbitsSignedInt.ddl -d /DS16BITS -M 0,2,10,6 packedbits.h5
+ call :tooltest tpbitsUnsignedInt.ddl -d /DU16BITS -M 0,2,10,6 packedbits.h5
+ call :tooltest tpbitsSignedLong.ddl -d /DS32BITS -M 0,2,26,6 packedbits.h5
+ call :tooltest tpbitsUnsignedLong.ddl -d /DU32BITS -M 0,2,26,6 packedbits.h5
+ call :tooltest tpbitsSignedLongLong.ddl -d /DS64BITS -M 0,2,58,6 packedbits.h5
+ call :tooltest tpbitsUnsignedLongLong.ddl -d /DU64BITS -M 0,2,58,6 packedbits.h5
+ rem Overlapped packed bits.
+ call :tooltest tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5
+ rem Maximum number of packed bits.
+ call :tooltest tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
+ rem Compound type.
+ call :tooltest tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5
+ rem Array type.
+ call :tooltest tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5
+ rem Test Error handling.
+ rem Too many packed bits requested. Max is 8 for now.
+ call :tooltest tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
+ rem Offset too large. Max is 7 (8-1) for now.
+ call :tooltest tpbitsOffsetExceeded.ddl -d /DS08BITS -M 64,1 packedbits.h5
+ call :tooltest tpbitsCharOffsetExceeded.ddl -d /DS08BITS -M 8,1 packedbits.h5
+ call :tooltest tpbitsIntOffsetExceeded.ddl -d /DS16BITS -M 16,1 packedbits.h5
+ call :tooltest tpbitsLongOffsetExceeded.ddl -d /DS32BITS -M 32,1 packedbits.h5
+ rem Bad offset, must not be negative.
+ call :tooltest tpbitsOffsetNegative.ddl -d /DS08BITS -M -1,1 packedbits.h5
+ rem Bad length, must not be positive.
+ call :tooltest tpbitsLengthPositive.ddl -d /DS08BITS -M 4,0 packedbits.h5
+ rem Offset+Length is too large. Max is 8 for now.
+ call :tooltest tpbitsLengthExceeded.ddl -d /DS08BITS -M 37,28 packedbits.h5
+ call :tooltest tpbitsCharLengthExceeded.ddl -d /DS08BITS -M 2,7 packedbits.h5
+ call :tooltest tpbitsIntLengthExceeded.ddl -d /DS16BITS -M 10,7 packedbits.h5
+ call :tooltest tpbitsLongLengthExceeded.ddl -d /DS32BITS -M 26,7 packedbits.h5
+ rem Incomplete pair of packed bits request.
+ call :tooltest tpbitsIncomplete.ddl -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5
if %nerrors% equ 0 (
echo.All %dumper% tests passed.
diff --git a/windows/tools/h5import/h5importtestutil.bat b/windows/tools/h5import/h5importtestutil.bat index 9c224f5..6ac8077 100644 --- a/windows/tools/h5import/h5importtestutil.bat +++ b/windows/tools/h5import/h5importtestutil.bat @@ -22,6 +22,9 @@ rem setlocal enabledelayedexpansion
pushd %~dp0
+rem srcdir is used on Unix-- define as the current directory for Windows.
+set srcdir=%CD%
+
rem The tool name
set h5import=h5import%2
rem The path of the tool binary
@@ -37,9 +40,6 @@ set h5dump=..\h5dump%2\%1\h5dump%2 rem The path of the h5dump tool binary
set h5dump_bin=%CD%\%h5dump%
-rem source directory (this is already defined in the Linux script)
-set srcdir=%CD%
-
rem initialize errors variables
set errors=0
@@ -104,67 +104,52 @@ goto main rem On Windows, echo gives a carriage return, so we store the TESTING params
rem and call TESTING from TOOLTEST. --SJW 8/27/07
set testing=ASCII I32 rank 3 - Output BE
- rem call :tooltest txtin32 -c %CD%\testfiles\textin32 -o test1.h5
call :tooltest %srcdir%\testfiles\txtin16.txt -c %srcdir%\testfiles\txtin32.conf -o txtin32.h5
set testing=ASCII I16 rank 3 - Output LE - CHUNKED - extended
- rem call :tooltest txtin16 -c %CD%\testfiles\textin16 -o test2.h5
call :tooltest %srcdir%\testfiles\txtin16.txt -c %srcdir%\testfiles\txtin16.conf -o txtin16.h5
set testing=ASCII I8 - rank 3 - Output I16 LE-Chunked+Extended+Compressed
- rem call :tooltest txtin16 -c %CD%\testfiles\textin8 -o test3.h5
call :tooltest %srcdir%\testfiles\txtin16.txt -c %srcdir%\testfiles\txtin8.conf -o txtin8.h5
set testing=ASCII UI32 - rank 3 - Output BE
- rem call :tooltest %CD%\testfiles\in1 -c %CD%\testfiles\textuin32 -o test4.h5
- call :tooltest %srcdir%\testfiles\txtuin32.txt -c %srcdir%\testfiles\txtuin32.conf -o txtuin32.h5
+ call :tooltest %srcdir%\testfiles\txtin32.txt -c %srcdir%\testfiles\txtuin32.conf -o txtuin32.h5
set testing=ASCII UI16 - rank 2 - Output LE+Chunked+Compressed
- rem call :tooltest %CD%\testfiles\in1 -c %CD%\testfiles\textuin16 -o test5.h5
call :tooltest %srcdir%\testfiles\txtuin32.txt -c %srcdir%\testfiles\txtuin16.conf -o txtuin16.h5
set testing=ASCII F32 - rank 3 - Output LE
- rem call :tooltest %CD%\testfiles\fp1 -c %CD%\testfiles\textfp32 -o test6.h5
call :tooltest %srcdir%\testfiles\txtfp32.txt -c %srcdir%\testfiles\txtfp32.conf -o txtfp32.h5
set testing=ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed
- rem call :tooltest %CD%\testfiles\fp2 -c %CD%\testfiles\textfp64 -o test7.h5
call :tooltest %srcdir%\testfiles\txtfp64.txt -c %srcdir%\testfiles\txtfp64.conf -o txtfp64.h5
set testing=BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed
- rem call :tooltest bfp64 -c %CD%\testfiles\conbfp64 -o test8.h5
call :tooltest binfp64.bin -c %srcdir%\testfiles\binfp64.conf -o binfp64.h5
set testing=BINARY I16 - rank 3 - Output order LE + CHUNKED + extended
- rem call :tooltest bin16 -c %CD%\testfiles\conbin16 -o test9.h5
call :tooltest binin16.bin -c %srcdir%\testfiles\binin16.conf -o binin16.h5
set testing=BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed
- rem call :tooltest bin8 -c %CD%\testfiles\conbin8 -o test10.h5
call :tooltest binin8.bin -c %srcdir%\testfiles\binin8.conf -o binin8.h5
set testing=BINARY I32 - rank 3 - Output BE + CHUNKED
- rem call :tooltest bin32 -c %CD%\testfiles\conbin32 -o test11.h5
call :tooltest binin32.bin -c %srcdir%\testfiles\binin32.conf -o binin32.h5
set testing=BINARY UI16 - rank 3 - Output byte BE + CHUNKED
- rem call :tooltest buin16 -c %CD%\testfiles\conbuin16 -o test12.h5
call :tooltest binuin16.bin -c %srcdir%\testfiles\binuin16.conf -o binuin16.h5
set testing=BINARY UI32 - rank 3 - Output LE + CHUNKED
- rem call :tooltest buin32 -c %CD%\testfiles\conbuin32 -o test13.h5
call :tooltest binuin32.bin -c %srcdir%\testfiles\binuin32.conf -o binuin32.h5
set testing=STR
- rem call :tooltest %CD%\testfiles\txtstr -c %CD%\testfiles\textstr -o teststr.h5
call :tooltest %srcdir%\testfiles\txtstr.txt -c %srcdir%\testfiles\txtstr.conf -o txtstr.h5
set testing=BINARY I8 CR LF EOF
call :tooltest binin8w.bin -c %srcdir%\testfiles\binin8w.conf -o binin8w.h5
- set testing=ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE
- call :tooltest %srcdir%\testfiles\in64.txt -c %srcdir%\testfiles\textpfe.conf -o test15.h5
-
+ set testing=ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE
+ call :tooltest %srcdir%\testfiles\textpfe64.txt -c %srcdir%\testfiles\textpfe.conf -o textpfe.h5
del /f *.txt *.bin *.h5
|