summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-05-31 22:07:49 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-05-31 22:07:49 (GMT)
commit1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e (patch)
tree20d28f7dd91b67f06880d6ca6566c1caa3dc06ae /tools/test/h5repack
parent734aebc39538039c6e81db63edd68eb3a2029cd2 (diff)
parent5c5ea7e89fbac1d31880d61e6a35ff6034019078 (diff)
downloadhdf5-1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e.zip
hdf5-1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e.tar.gz
hdf5-1e9354bcf551c16f3ad9d6a4ad42a2bce827c95e.tar.bz2
Merge branch 'develop' into windows_open
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake9
-rw-r--r--tools/test/h5repack/Makefile.am4
-rw-r--r--tools/test/h5repack/h5repack.sh.in48
-rw-r--r--tools/test/h5repack/h5repacktst.c2
-rw-r--r--tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl36
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt4
6 files changed, 81 insertions, 22 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index 04e405f..897209c 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -90,6 +90,7 @@
${HDF5_TOOLS_DIR}/testfiles/tfamily00008.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00009.h5
${HDF5_TOOLS_DIR}/testfiles/tfamily00010.h5
+ ${HDF5_TOOLS_DIR}/testfiles/tordergr.h5
# tools/testfiles/vds
${HDF5_TOOLS_DIR}/testfiles/vds/1_a.h5
${HDF5_TOOLS_DIR}/testfiles/vds/1_b.h5
@@ -137,6 +138,7 @@
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v.ddl
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl
${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst
+ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/crtorder.tordergr.h5.ddl
)
foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
@@ -312,7 +314,7 @@
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}"
+ -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
@@ -965,6 +967,11 @@
endif ()
ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
+#crtorder
+ set (arg tordergr.h5 -L)
+ set (TESTTYPE "TEST")
+ ADD_H5_DMP_TEST (crtorder ${TESTTYPE} 0 ${arg})
+
#########################################################
# layout options (these files have no filters)
#########################################################
diff --git a/tools/test/h5repack/Makefile.am b/tools/test/h5repack/Makefile.am
index b3cfc88..da2a3c3 100644
--- a/tools/test/h5repack/Makefile.am
+++ b/tools/test/h5repack/Makefile.am
@@ -56,8 +56,8 @@ libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EX
libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD)
-install-exec-hook:
- $(RM) $(DESTDIR)$(dyndir)/*dynlib*
+#install-exec-hook:
+# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif
diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in
index c943b22..bc6b527 100644
--- a/tools/test/h5repack/h5repack.sh.in
+++ b/tools/test/h5repack/h5repack.sh.in
@@ -113,6 +113,7 @@ $SRC_TOOLS_TESTFILES/tfamily00007.h5
$SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
+$SRC_TOOLS_TESTFILES/tordergr.h5
$SRC_TOOLS_TESTFILES/vds/1_a.h5
$SRC_TOOLS_TESTFILES/vds/1_b.h5
$SRC_TOOLS_TESTFILES/vds/1_c.h5
@@ -143,6 +144,7 @@ $SRC_H5REPACK_TESTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
+$SRC_H5REPACK_TESTFILES/crtorder.tordergr.h5.ddl
$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_filters.h5-gzip_verbose_filters.tst
@@ -177,7 +179,7 @@ COPY_TESTFILES_TO_TESTDIR()
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
- $CP -f $tstfile $TESTDIR
+ $CP -f $tstfile $TESTDIR
if [ $? -ne 0 ]; then
echo "Error: FAILED to copy $tstfile ."
@@ -373,6 +375,8 @@ VERIFY_LAYOUT_VDS()
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual > /dev/null 2>&1 ; then
echo " PASSED"
else
@@ -384,7 +388,7 @@ VERIFY_LAYOUT_VDS()
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err
+ rm -f $actual $actual_err
fi
# clean up tmp files
@@ -539,11 +543,11 @@ TOOLTEST1()
)
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
rm -f $outfile
}
@@ -570,11 +574,11 @@ TOOLTESTV()
) >$actual 2>$actual_err
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
# display output compare
@@ -635,6 +639,8 @@ TOOLTESTM() {
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
+ echo " Expected result (*.tst) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
echo " PASSED"
else
@@ -646,7 +652,7 @@ TOOLTESTM() {
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
@@ -680,7 +686,7 @@ TOOLTEST_DUMP()
VERIFY h5dump output $@
(
cd $TESTDIR
- $RUNSERIAL $H5DUMP_BIN -pH $outfile
+ $RUNSERIAL $H5DUMP_BIN -q creation_order -pH $outfile
) >$actual 2>$actual_err
cat $actual_err >> $actual
@@ -760,11 +766,11 @@ TOOLTEST_META()
# verify sizes.
MESSAGE "Verify the sizes of both output files ($size1 vs $size2)"
if [ $size1 -lt $size2 ]; then
- # pass
- echo " PASSED"
+ # pass
+ echo " PASSED"
else
- #fail
- echo "*FAILED*"
+ #fail
+ echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
fi
@@ -791,6 +797,8 @@ TOOLTEST_HELP() {
# Create the expect data file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect-CREATED
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif cmp -s $expect $actual; then
echo " PASSED"
else
@@ -838,7 +846,7 @@ USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN`
fi
##############################################################################
-### T H E T E S T S
+### T H E T E S T S
##############################################################################
# prepare for test
COPY_TESTFILES_TO_TESTDIR
@@ -1045,6 +1053,10 @@ else
TOOLTEST deflate_file $arg
fi
+#crtorder
+arg="tordergr.h5 -L"
+TOOLTEST_DUMP crtorder $arg
+
#########################################################
# layout options (these files have no filters)
#########################################################
@@ -1223,7 +1235,7 @@ TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP vds_dset_chunk_20x10x5
else
- VERIFY_LAYOUT_VDS vds_dset_chunk_20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
+ VERIFY_LAYOUT_VDS vds_dset_chunk20x10x5 1_vds.h5 vds_dset CHUNKED --layout vds_dset:CHUNK=20x10x5
fi
if test $USE_FILTER_DEFLATE != "yes" ; then
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 09183f1..6449844 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -266,7 +266,7 @@ int main (void)
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- pack_options.fs_strategy = -1; /* "FSM_AGGR" specified via -S FSM_AGGR */
+ pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */
pack_options.fs_threshold = -1; /* "0" specified via -T 0 */
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
diff --git a/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
new file mode 100644
index 0000000..870d154
--- /dev/null
+++ b/tools/test/h5repack/testfiles/crtorder.tordergr.h5.ddl
@@ -0,0 +1,36 @@
+HDF5 "out-crtorder.tordergr.h5" {
+GROUP "/" {
+ GROUP "2" {
+ GROUP "a" {
+ GROUP "a1" {
+ }
+ GROUP "a2" {
+ GROUP "a21" {
+ }
+ GROUP "a22" {
+ }
+ }
+ }
+ GROUP "b" {
+ }
+ GROUP "c" {
+ }
+ }
+ GROUP "1" {
+ GROUP "c" {
+ }
+ GROUP "b" {
+ }
+ GROUP "a" {
+ GROUP "a1" {
+ }
+ GROUP "a2" {
+ GROUP "a22" {
+ }
+ GROUP "a21" {
+ }
+ }
+ }
+ }
+}
+}
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index 69b1644..65edd89 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -17,6 +17,8 @@ usage: h5repack [OPTIONS] file1 file2
-M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size
-t T, --threshold=T Threshold value for H5Pset_alignment
-a A, --alignment=A Alignment value for H5Pset_alignment
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
-f FILT, --filter=FILT Filter type
-l LAYT, --layout=LAYT Layout type
-S FS_STRATEGY, --fs_strategy=FS_STRATEGY File space management strategy for H5Pset_file_space_strategy
@@ -30,6 +32,8 @@ usage: h5repack [OPTIONS] file1 file2
U - is a filename.
T - is an integer
A - is an integer greater than zero
+ Q - is the sort index type for the input file. It can be "name" or "creation_order" (default)
+ Z - is the sort order type for the input file. It can be "descending" or "ascending" (default)
B - is the user block size, any value that is 512 or greater and is
a power of 2 (1024 default)
F - is the shared object header message type, any of <dspace|dtype|fill|