HDFFV-8611 change h5repack to save the root group creation order

Added test and new arguments to control the the input file parsing.
This commit is contained in:
Allen Byrne
2017-05-22 13:10:40 -05:00
parent 8861b5a494
commit cdcef539a3
13 changed files with 191 additions and 44 deletions

View File

@@ -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)
#########################################################

View File

@@ -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" {
}
}
}
}
}
}

View File

@@ -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|