summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--vms/tools/h5dump/check.com199
-rw-r--r--vms/tools/h5dump/check_h5dump.com92
3 files changed, 86 insertions, 206 deletions
diff --git a/MANIFEST b/MANIFEST
index 136ee1a..380bbdd 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1629,7 +1629,6 @@
./vms/tools/h5copy/make.com
./vms/tools/h5copy/check_h5copy.com
./vms/tools/h5dump/make.com
-./vms/tools/h5dump/check.com
./vms/tools/h5dump/check_h5dump.com
./vms/tools/h5ls/check.com
./vms/tools/h5ls/check_h5ls.com
diff --git a/vms/tools/h5dump/check.com b/vms/tools/h5dump/check.com
deleted file mode 100644
index 8c3b383..0000000
--- a/vms/tools/h5dump/check.com
+++ /dev/null
@@ -1,199 +0,0 @@
-$!#
-$!# Copyright by The HDF Group.
-$!# Copyright by the Board of Trustees of the University of Illinois.
-$!# All rights reserved.
-$!#
-$!# This file is part of HDF5. The full HDF5 copyright notice, including
-$!# terms governing use, modification, and redistribution, is contained in
-$!# the files COPYING and Copyright.html. COPYING can be found at the root
-$!# of the source code distribution tree; Copyright.html can be found at the
-$!# root level of an installed copy of the electronic HDF5 document set and
-$!# is linked from the top-level documents page. It can also be found at
-$!# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-$!# access to either file, you may request a copy from help@hdfgroup.org.
-$!#
-$!
-$! h5dump testing script
-$!
-$! Some tests suppose to fail; to prevent exit from the command
-$! file and continue with outher tests, those tests are commented out
-$! for now with the comment "has error message"
-$! Some features like filters and file drivers have not been tested yet
-$!
-$! EIP, April 12, 2006
-$!
-$ define sys$output h5dump.out
-$! define sys$error h5dump.err
-$ h5dump :== $sys$sysusers:[pourmale.hdf5.tools.h5dump]h5dump.exe
-$! test for displaying groups
-$ h5dump tgroup.h5
-$!
-$! test for displaying the selected groups (has error message)
-$! h5dump --group=/g2 --group / -g /y tgroup.h5
-$! test for displaying simple space datasets
-$ h5dump tdset.h5
-$! h5dump -"H" -d dset1 -d /dset2 --dataset=dset3 tdset.h5
-$! h5dump -"H" -d dset1 -d /dset2 -d dset3 tdset.h5
-$!
-$! test for displaying attributes
-$ h5dump tattr.h5
-$!
-$! test for displaying the selected attributes of string type and scalar space
-$! (has error message)
-$! h5dump -a /attr1 --attribute /attr4 --attribute=/attr5 tattr.h5
-$! test for header and error messages
-$ h5dump -"A" tnamed_dtype_attr.h5
-$! test for displaying soft links
-$ h5dump tslink.h5
-$! test for displaying the selected link
-$ h5dump -l slink2 tslink.h5
-$! tests for hard links
-$ h5dump thlink.h5
-$ h5dump -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5
-$ h5dump -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5
-$ h5dump -g /g1 thlink.h5
-$ h5dump -d /dset1 -g /g2 -d /g1/dset2 thlink.h5
-$! tests for compound data types
-$ h5dump tcompound.h5
-$! test for named data types
-$ h5dump -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5
-$! test for unamed type
-$! test complicated compound datatype
-$ h5dump tcompound_complex.h5
-$!test for the nested compound type
-$ h5dump tnestedcomp.h5
-$! test for options
-$ h5dump tall.h5
-$ h5dump --header -g /g1/g1.1 -a attr2 tall.h5
-$ h5dump -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5
-$! test for loop detection
-$ h5dump tloop.h5
-$! test for string
-$ h5dump tstr.h5
-$ h5dump tstr2.h5
-$! test for file created by Lib SAF team
-$ h5dump tsaf.h5
-$! test for file with variable length data
-$ h5dump tvldtypes1.h5
-$ h5dump tvldtypes2.h5
-$ h5dump tvldtypes3.h5
-$ h5dump tvldtypes4.h5
-$ h5dump tvldtypes5.h5
-$!test for file with variable length string data
-$ h5dump tvlstr.h5
-$! test for files with array data
-$ h5dump tarray1.h5
-$ h5dump tarray2.h5
-$ h5dump tarray3.h5
-$ h5dump tarray4.h5
-$ h5dump tarray5.h5
-$ h5dump tarray6.h5
-$ h5dump tarray7.h5
-$! test for files with empty data
-$ h5dump tempty.h5
-$! test for files with groups that have comments
-$ h5dump tgrp_comments.h5
-$! test the --filedriver flag
-$! h5dump --filedriver=split tsplit_file
-$! h5dump --filedriver=family tfamily%05d.h5
-$! h5dump --filedriver=multi tmulti
-$! test for files with group names which reach > 1024 bytes in size
-$ h5dump -w157 tlarge_objname.h5
-$ h5dump -"A" tall.h5
-$! test '-r' to print attributes in ASCII instead of decimal
-$ h5dump -"A" -r tall.h5
-$! test Subsetting
-$ h5dump --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5
-$ h5dump -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5
-$ h5dump -d "/dset1[1,1;;;]" tdset.h5
-$ h5dump -d "/dset1[;3,2;4,4;1,4]" tdset2.h5
-$! test printing characters in ASCII instead of decimal
-$ h5dump -r tchar.h5
-$! test failure handling
-$! Missing file name (has error message)
-$! h5dump
-$! rev. 2004
-$ h5dump -"H" -"B" -d dset tfcontents1.h5
-$ h5dump -"B" tfcontents2.h5
-$! test -p with a non existing dataset (has error message)
-$! h5dump -p -d bogus tfcontents1.h5
-$! test for file contents
-$ h5dump -n tfcontents1.h5
-$! tests for storage layout
-$! compact
-$ h5dump --header -p -d compact tfilters.h5
-$! contiguous
-$ h5dump --header -p -d contiguous tfilters.h5
-$! chunked
-$ h5dump --header -p -d chunked tfilters.h5
-$! external
-$ h5dump --header -p -d external tfilters.h5
-$! fill values
-$ h5dump -p tfvalues.h5
-$! several datatype, with references , print path
-$ h5dump tattr2.h5
-$! escape/not escape non printable characters
-$ h5dump -e tstr3.h5
-$ h5dump tstr3.h5
-$! char data as ASCII with non escape
-$ h5dump -r -d str4 tstr3.h5
-$! array indices print/not print
-$ h5dump taindices.h5
-$ h5dump -y taindices.h5
-$! tests for filters
-$! SZIP
-$!option="-H -p -d szip tfilters.h5"
-$!if test $USE_FILTER_SZIP != "yes"; then
-$! SKIP $option
-$!else
-$!$! h5dump tszip.ddl $option
-$!fi
-$! deflate
-$!option="-H -p -d deflate tfilters.h5"
-$!if test $USE_FILTER_DEFLATE != "yes"; then
-$! SKIP $option
-$!else
-$! $! h5dump tdeflate.ddl $option
-$!fi
-$!$! shuffle
-$!option="-H -p -d shuffle tfilters.h5"
-$!if test $USE_FILTER_SHUFFLE != "yes"; then
-$! SKIP $option
-$!else
-$! $! h5dump tshuffle.ddl $option
-$!fi
-$! fletcher32
-$!option="-H -p -d fletcher32 tfilters.h5"
-$!if test $USE_FILTER_FLETCHER32 != "yes"; then
-$! SKIP $option
-$!else
-$! $! h5dump tfletcher32.ddl $option
-$!fi
-$! nbit
-$!option="-H -p -d nbit tfilters.h5"
-$!if test $USE_FILTER_NBIT != "yes"; then
-$! SKIP $option
-$!else
-$! $! h5dump tnbit.ddl $option
-$!fi
-$!$! scaleoffset
-$!option="-H -p -d scaleoffset tfilters.h5"
-$!if test $USE_FILTER_SCALEOFFSET != "yes"; then
-$! SKIP $option
-$!else
-$! $! h5dump tscaleoffset.ddl $option
-$!fi
-$! all
-$!option="-H -p -d all tfilters.h5"
-$!if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes"; then
-$! SKIP $option
-$!else
-$! $! h5dump tallfilters.ddl $option
-$!fi
-$! user defined
-$ h5dump -"H" -p -d myfilter tfilters.h5
-$! test for displaying dataset and attribute of null space
-$ h5dump tnullspace.h5
-$! test for displaying objects with very long names
-$ h5dump tlonglinks.h5
-$ exit
diff --git a/vms/tools/h5dump/check_h5dump.com b/vms/tools/h5dump/check_h5dump.com
index f8b4212..db2951a 100644
--- a/vms/tools/h5dump/check_h5dump.com
+++ b/vms/tools/h5dump/check_h5dump.com
@@ -30,6 +30,7 @@ $ ! Define output for diff command that compares expected and actual
$ ! outputs of h5dump
$ !
$ create h5dump.log
+$ create h5dump_output.txt
$ !
$ ! h5dump tests
$ !
@@ -71,7 +72,7 @@ $ CALL TOOLTEST tcomp-1.ddl "tcompound.h5"
$ ! test for named data types
$ CALL TOOLTEST tcomp-2.ddl "-t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5"
$ ! Test for unamed type
-$ CALL TOOLTEST tcomp-3.ddl "-t /#6632:0 -g /group2 tcompound.h5"
+$ CALL TOOLTEST tcomp-3.ddl "-t /#6632 -g /group2 tcompound.h5"
$ ! Test complicated compound datatype
$ CALL TOOLTEST tcomp-4.ddl "tcompound_complex.h5"
$
@@ -136,7 +137,7 @@ $ ! Test Subsetting
$ 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 """/"g"1/"g"1.1/"dset"1.1.2[0;2;10;]""" tall.h5"
$ CALL TOOLTEST tdset-3s.ddl "-d """/"dset"1[1,1;;;]""" tdset.h5"
-$ CALL TOOLTEST tdset2-1s.ddl "-d """/"dset"1[;3,2;4,4;1,4]""" tdset2.h5"
+$ CALL TOOLTEST tdset-3s.ddl "-d """/"dset"1[;3,2;4,4;1,4]""" tdset2.h5"
$
$ ! Test printing characters in ASCII instead of decimal
$ CALL TOOLTEST tchar1.ddl "-r tchar.h5"
@@ -241,7 +242,7 @@ $ ! Test for displaying dataset and attribute of null space
$ CALL TOOLTEST tnullspace.ddl "tnullspace.h5"
$
$ ! Test for displaying objects with very long names
-$ CALL TOOLTEST tlonglinks.ddl "tlonglinks.h5"
+$ !CALL TOOLTEST tlonglinks.ddl "tlonglinks.h5"
$
$ ! Test for long double (some systems do not have long double)
$ ! CALL TOOLTEST tldouble.ddl "tldouble.h5"
@@ -250,7 +251,25 @@ $ ! Test for vms
$ CALL TOOLTEST tvms.ddl "tvms.h5"
$
$ !test for binary output
-$ CALL TOOLTEST tbin.ddl "-d integer -b out.bin test1.h5"
+$ CALL TOOLTEST1 tbin1.ddl "-d integer -o out1.bin -b """LE""" tbinary.h5"
+$ CALL TOOLTEST1 tbin2.ddl "-d float -o out2.bin -b """BE""" tbinary.h5"
+$ CALL TOOLTEST1 tbin4.ddl "-d double -o out4.bin -b """FILE""" tbinary.h5"
+$
+$ ! Test for dataset region references
+$ CALL TOOLTEST tdatareg.ddl "tdatareg.h5"
+$
+$ ! tests for group creation order "1" tracked, "2" name, root tracked
+$ CALL TOOLTEST tordergr1.ddl "--group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5"
+$ CALL TOOLTEST tordergr2.ddl "--group=1 --sort_by=creation_order --sort_order=descending tordergr.h5"
+$ CALL TOOLTEST tordergr3.ddl "-g 2 -q name -z ascending tordergr.h5"
+$ CALL TOOLTEST tordergr4.ddl "-g 2 -q name -z descending tordergr.h5"
+$ CALL TOOLTEST tordergr5.ddl "-q creation_order tordergr.h5"
+$
+$ ! Tests for attribute order
+$ CALL TOOLTEST torderattr1.ddl "-"""H""" --sort_by=name --sort_order=ascending torderattr.h5"
+$ CALL TOOLTEST torderattr2.ddl "-"""H""" --sort_by=name --sort_order=descending torderattr.h5"
+$ CALL TOOLTEST torderattr3.ddl "-"""H""" --sort_by=creation_order --sort_order=ascending torderattr.h5"
+$ CALL TOOLTEST torderattr4.ddl "-"""H""" --sort_by=creation_order --sort_order=descending torderattr.h5"
$ !
$TOOLTEST: SUBROUTINE
$
@@ -306,11 +325,72 @@ $ !
$ ! Append the result to the log file
$ !
$ append h5dump_temp.dif h5dump.log
+$ append 'actual' h5dump_output.txt
$ !
$ ! Delete temporary files
$ !
-$! del *.out;*
-$! del *.dif;*
+$ del *.out;*
+$ del *.dif;*
+$ !
+$ENDSUBROUTINE
+$
+$TOOLTEST1: SUBROUTINE
+$
+$ len = F$LENGTH(P1)
+$ base = F$EXTRACT(0,len-3,P1)
+$ actual = base + "out"
+$ actual_err = base + "err"
+$
+$ begin = "Testing h5dump "
+$ !
+$ ! Run the test and save output in the 'actual' file
+$ !
+$ define/nolog sys$output 'actual'
+$ define/nolog sys$error 'actual_err'
+$ ON ERROR THEN CONTINUE
+$ h5dump 'P2
+$ deassign sys$output
+$ deassign sys$error
+$ if F$SEARCH(actual_err) .NES. ""
+$ then
+$ set message/notext/nofacility/noidentification/noseverity
+$ append 'actual_err' 'actual'
+$ set message/ntext/facility/identification/severity
+$ endif
+$ !
+$ ! Compare the results
+$ !
+$ diff/output=h5dump_temp/ignore=(spacing,trailing_spaces,blank_lines) 'actual' 'P1'
+$ open/read temp_out h5dump_temp.dif
+$ read temp_out record1
+$ close temp_out
+$ !
+$ ! Extract error code and format output line
+$ !
+$ len = F$LENGTH(record1)
+$ err_code = F$EXTRACT(len-1,1,record1)
+$ if err_code .eqs. "0"
+$ then
+$ result = "PASSED"
+$ line = F$FAO("!15AS !50AS !70AS", begin, P2, result)
+$ else
+$ result = "*FAILED*"
+$ line = F$FAO("!15AS !49AS !69AS", begin, P2, result)
+$ endif
+$ !
+$ ! Print test result
+$ !
+$ write sys$output line
+$ !
+$ ! Append the result to the log file
+$ !
+$ append h5dump_temp.dif h5dump.log
+$ append 'actual' h5dump_output.txt
+$ !
+$ ! Delete temporary files
+$ !
+$ del *.out;*
+$ del *.dif;*
$ !
$ENDSUBROUTINE