diff --git a/C/H5T/CMakeLists.txt b/C/H5T/CMakeLists.txt index 2932e2a..b6c22d3 100644 --- a/C/H5T/CMakeLists.txt +++ b/C/H5T/CMakeLists.txt @@ -95,7 +95,7 @@ if (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.tst ${testdest}.tst ) - if (HDF5_BUILD_TOOLS AND NOT ${example_name} STREQUAL "h5ex_t_convert") + if (HDF5_BUILD_TOOLS) add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD @@ -112,6 +112,42 @@ if (BUILD_TESTING) ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst ) ADD_H5_CMP_TEST (${example_name}) + elseif (${example_name} STREQUAL "h5ex_t_vlen" OR ${example_name} STREQUAL "h5ex_t_vlenatt") + set (testdest "${PROJECT_BINARY_DIR}/${example_name}") + #message (STATUS " Copying ${example_name}.test") + add_custom_command ( + TARGET ${EXAMPLE_VARNAME}_${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.tst ${testdest}.tst + ) + if (HDF5_BUILD_TOOLS) + if (${${EXAMPLE_VARNAME}_USE_16_API} OR ${${EXAMPLE_VARNAME}_USE_18_API} OR ${${EXAMPLE_VARNAME}_USE_110_API} OR ${${EXAMPLE_VARNAME}_USE_112_API}) + if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.14") + add_custom_command ( + TARGET ${EXAMPLE_VARNAME}_${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/114/${example_name}.ddl ${testdest}.ddl + ) + else () + add_custom_command ( + TARGET ${EXAMPLE_VARNAME}_${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.ddl ${testdest}.ddl + ) + endif () + else () + add_custom_command ( + TARGET ${EXAMPLE_VARNAME}_${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.ddl ${testdest}.ddl + ) + endif () + endif () + ADD_H5_TEST (${example_name}) else () set (testdest "${PROJECT_BINARY_DIR}/${example_name}") #message (STATUS " Copying ${example_name}.test") @@ -121,7 +157,7 @@ if (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.tst ${testdest}.tst ) - if (HDF5_BUILD_TOOLS AND NOT ${example_name} STREQUAL "h5ex_t_convert") + if (HDF5_BUILD_TOOLS) if (${${EXAMPLE_VARNAME}_USE_16_API} OR ${${EXAMPLE_VARNAME}_USE_18_API} OR ${${EXAMPLE_VARNAME}_USE_110_API}) if ((HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12") AND ((${example_name} STREQUAL "h5ex_t_objref" OR ${example_name} STREQUAL "h5ex_t_objrefatt") OR (${example_name} STREQUAL "h5ex_t_regref" OR ${example_name} STREQUAL "h5ex_t_regrefatt"))) add_custom_command ( diff --git a/C/H5T/testfiles/110/114/h5ex_t_vlen.ddl b/C/H5T/testfiles/110/114/h5ex_t_vlen.ddl new file mode 100644 index 0000000..95b9c5a --- /dev/null +++ b/C/H5T/testfiles/110/114/h5ex_t_vlen.ddl @@ -0,0 +1,11 @@ +HDF5 "h5ex_t_vlen.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } +} +} diff --git a/C/H5T/testfiles/110/114/h5ex_t_vlenatt.ddl b/C/H5T/testfiles/110/114/h5ex_t_vlenatt.ddl new file mode 100644 index 0000000..80005df --- /dev/null +++ b/C/H5T/testfiles/110/114/h5ex_t_vlenatt.ddl @@ -0,0 +1,17 @@ +HDF5 "h5ex_t_vlenatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } + } +} +} diff --git a/C/H5T/testfiles/112/114/h5ex_t_vlen.ddl b/C/H5T/testfiles/112/114/h5ex_t_vlen.ddl new file mode 100644 index 0000000..95b9c5a --- /dev/null +++ b/C/H5T/testfiles/112/114/h5ex_t_vlen.ddl @@ -0,0 +1,11 @@ +HDF5 "h5ex_t_vlen.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } +} +} diff --git a/C/H5T/testfiles/112/114/h5ex_t_vlenatt.ddl b/C/H5T/testfiles/112/114/h5ex_t_vlenatt.ddl new file mode 100644 index 0000000..80005df --- /dev/null +++ b/C/H5T/testfiles/112/114/h5ex_t_vlenatt.ddl @@ -0,0 +1,17 @@ +HDF5 "h5ex_t_vlenatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } + } +} +} diff --git a/C/H5T/testfiles/112/h5ex_t_vlen.ddl b/C/H5T/testfiles/112/h5ex_t_vlen.ddl index 95b9c5a..53f4863 100644 --- a/C/H5T/testfiles/112/h5ex_t_vlen.ddl +++ b/C/H5T/testfiles/112/h5ex_t_vlen.ddl @@ -1,7 +1,7 @@ HDF5 "h5ex_t_vlen.h5" { GROUP "/" { DATASET "DS1" { - DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATATYPE H5T_VLEN { H5T_STD_I32LE} DATASPACE SIMPLE { ( 2 ) / ( 2 ) } DATA { (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) diff --git a/C/H5T/testfiles/112/h5ex_t_vlenatt.ddl b/C/H5T/testfiles/112/h5ex_t_vlenatt.ddl index 80005df..a2b32e8 100644 --- a/C/H5T/testfiles/112/h5ex_t_vlenatt.ddl +++ b/C/H5T/testfiles/112/h5ex_t_vlenatt.ddl @@ -6,7 +6,7 @@ GROUP "/" { DATA { } ATTRIBUTE "A1" { - DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATATYPE H5T_VLEN { H5T_STD_I32LE} DATASPACE SIMPLE { ( 2 ) / ( 2 ) } DATA { (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) diff --git a/C/H5T/testfiles/18/114/h5ex_t_vlen.ddl b/C/H5T/testfiles/18/114/h5ex_t_vlen.ddl new file mode 100644 index 0000000..95b9c5a --- /dev/null +++ b/C/H5T/testfiles/18/114/h5ex_t_vlen.ddl @@ -0,0 +1,11 @@ +HDF5 "h5ex_t_vlen.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } +} +} diff --git a/C/H5T/testfiles/18/114/h5ex_t_vlenatt.ddl b/C/H5T/testfiles/18/114/h5ex_t_vlenatt.ddl new file mode 100644 index 0000000..80005df --- /dev/null +++ b/C/H5T/testfiles/18/114/h5ex_t_vlenatt.ddl @@ -0,0 +1,17 @@ +HDF5 "h5ex_t_vlenatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE } + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } + } +} +}