Skip to content

Commit

Permalink
Address @brtnfld review
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Dec 21, 2023
1 parent c9d2128 commit 5054cc4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
23 changes: 21 additions & 2 deletions tools/test/h5dump/CMakeVFDTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,37 @@ set (HDF5_SF_VFD_H5DUMP_FILES
test_subfiling_stripe_sizes.h5
)

set (HDF5_SF2_VFD_H5DUMP_FILES
test_subfiling_precreate_rank_0.h5
)

foreach (vfdtest ${VFD_LIST})
if (vfdtest STREQUAL "subfiling")
foreach (h5_tfile ${HDF5_SF_VFD_H5DUMP_FILES})
foreach (h5_tfile ${HDF5_SF_VFD_H5DUMP_FILES})
file(COPY "${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" DESTINATION "${PROJECT_BINARY_DIR}/${vfdtest}")
execute_process(
COMMAND ls -i ${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}
OUTPUT_VARIABLE OUTPUT_VALUE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX MATCH "^ *([0-9]+) *" INODE_VALUE "${OUTPUT_VALUE}")
string(STRIP ${INODE_VALUE} INODE_STR)
string(STRIP ${INODE_VALUE} INODE_STR)
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile_1_of_1" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}_1_of_1" "HDF5_SF_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile.config" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}.config" "HDF5_SF_VFD_H5DUMP_files")
endforeach ()
foreach (h5_tfile ${HDF5_SF2_VFD_H5DUMP_FILES})
file(COPY "${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}" DESTINATION "${PROJECT_BINARY_DIR}/${vfdtest}")
execute_process(
COMMAND ls -i ${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}
OUTPUT_VARIABLE OUTPUT_VALUE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX MATCH "^ *([0-9]+) *" INODE_VALUE "${OUTPUT_VALUE}")
string(STRIP ${INODE_VALUE} INODE_STR)
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile_1_of_2" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}_1_of_2" "HDF5_SF2_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile_2_of_2" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}_2_of_2" "HDF5_SF2_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.subfile.config" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.subfile_${INODE_STR}.config" "HDF5_SF2_VFD_H5DUMP_files")
endforeach ()
endif ()
foreach (h5_tfile ${HDF5_VFD_H5DUMP_FILES})
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
Expand All @@ -51,6 +68,7 @@ endforeach ()

add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_VFD_H5DUMP tests" DEPENDS ${HDF5_VFD_H5DUMP_files_list})
add_custom_target(HDF5_SF_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_SF_VFD_H5DUMP tests" DEPENDS ${HDF5_SF_VFD_H5DUMP_files_list})
add_custom_target(HDF5_SF2_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_SF2_VFD_H5DUMP tests" DEPENDS ${HDF5_SF2_VFD_H5DUMP_files_list})

##############################################################################
##############################################################################
Expand Down Expand Up @@ -92,6 +110,7 @@ foreach (vfd ${VFD_LIST})
ADD_VFD_H5DUMP_TEST (${vfd} filedriver_subfiling 0 --enable-error-stack=2 --filedriver=subfiling test_subfiling_stripe_sizes.h5)
ADD_VFD_H5DUMP_TEST (${vfd} vfd_name_subfiling 0 --enable-error-stack=2 --vfd-name=subfiling test_subfiling_stripe_sizes.h5)
ADD_VFD_H5DUMP_TEST (${vfd} vfd_value_subfiling 0 --enable-error-stack=2 --vfd-value=12 test_subfiling_stripe_sizes.h5)
ADD_VFD_H5DUMP_TEST (${vfd} vfd_value_subfiling_2 0 --enable-error-stack=2 --vfd-value=12 -d DSET -s 0 -S 100 -c 10 test_subfiling_precreate_rank_0.h5)
endif ()
# test for signed/unsigned datasets
ADD_VFD_H5DUMP_TEST (${vfd} packedbits 0 --enable-error-stack packedbits.h5)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
stripe_size=22495773
subfile_count=2
Binary file not shown.
Binary file not shown.

0 comments on commit 5054cc4

Please sign in to comment.