summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-07-12 17:16:00 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-07-12 17:16:00 (GMT)
commitd6d7e62d0b0920c6f63f111b60a22f5a9a50eda5 (patch)
treedcdf7c925cb07dc309780d401bf8fb03334c415a /tools
parent79d909194836c3847669acb78cad15d743f8a135 (diff)
downloadhdf5-d6d7e62d0b0920c6f63f111b60a22f5a9a50eda5.zip
hdf5-d6d7e62d0b0920c6f63f111b60a22f5a9a50eda5.tar.gz
hdf5-d6d7e62d0b0920c6f63f111b60a22f5a9a50eda5.tar.bz2
[svn-r30171] HDFFV-9939: convert cmake copy commands to reduce issue with too long command lines on some platforms.
Also, refactor hl/tools/gif3h5 cmake files. JAVA-1920: add plugin test with plugin that depends on hdf5
Diffstat (limited to 'tools')
-rw-r--r--tools/h5copy/CMakeTests.cmake48
-rw-r--r--tools/h5diff/CMakeTests.cmake66
-rw-r--r--tools/h5dump/CMakeTests.cmake92
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake38
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake43
-rw-r--r--tools/h5dump/testh5dump.sh.in8
-rw-r--r--tools/h5import/CMakeTests.cmake64
-rw-r--r--tools/h5jam/CMakeTests.cmake23
-rw-r--r--tools/h5ls/CMakeTests.cmake21
-rw-r--r--tools/h5repack/CMakeTests.cmake100
-rw-r--r--tools/h5stat/CMakeTests.cmake30
-rw-r--r--tools/misc/CMakeTests.cmake77
-rw-r--r--tools/perform/CMakeTests.cmake10
13 files changed, 230 insertions, 390 deletions
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index 9002e5a..96dc92b 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -4,7 +4,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -22,17 +22,11 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #message (STATUS " Copying ${listfiles}")
- add_custom_command (
- TARGET h5copy
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${listfiles} ${dest}
- )
+ get_filename_component(fname "${listfiles}" NAME)
+ HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5copy_files")
endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
+ add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -48,7 +42,7 @@
add_test (
NAME H5COPY_F-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/${testname}.out.h5
)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -77,14 +71,14 @@
endif (${resultcode} STREQUAL "1")
endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_F_TEST)
-
+
MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5COPY-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/${testname}.out.h5
)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -113,14 +107,14 @@
endif (${resultcode} STREQUAL "1")
endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST)
-
+
MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5COPY-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/${testname}.out.h5
)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -154,14 +148,14 @@
endif (${resultcode} STREQUAL "1")
endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST2)
-
+
MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5COPY_SAME-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/${testname}.out.h5
)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -215,7 +209,7 @@
add_test (
NAME H5COPY-CMP-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/${testname}.out.h5
./testfiles/${testname}.out.out
./testfiles/${testname}.out.out.err
@@ -243,7 +237,7 @@
##############################################################################
# --------------------------------------------------------------------
- # test file names
+ # test file names
# --------------------------------------------------------------------
set (HDF_FILE1 h5copytst)
set (HDF_FILE2 h5copy_ref)
@@ -255,7 +249,7 @@
add_test (
NAME H5COPY-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
simple.out.h5
chunk.out.h5
compact.out.h5
@@ -297,7 +291,7 @@
endif (NOT "${last_test}" STREQUAL "")
set (last_test "H5COPY-clearall-objects")
endif (HDF5_ENABLE_USING_MEMCHECKER)
-
+
# "Test copying various forms of datasets"
ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple)
ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 -v -s chunk -d chunk)
@@ -333,13 +327,13 @@
ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple)
ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets -d /E/F/grp_dsets)
ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 -vp -s /grp_nested -d /G/H/grp_nested)
-
+
############# COPY REFERENCES ##############
# "Test copying object and region references"
ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ref -v -s / -d /COPY)
-############# COPY EXT LINKS ##############
+############# COPY EXT LINKS ##############
# "Test copying external link directly without -f ext"
ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_dset -d /copy1_dset)
@@ -363,15 +357,15 @@
ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext -d /copy1_group)
# "Test copying a group contains external links with -f ext"
- ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group)
+ ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group)
-############# Test misc. ##############
+############# Test misc. ##############
#-----------------------------------------------------------------
# "Test copying object into group which doesn't exist, without -p"
#
ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 -v -s /simple -d /g1/g2/simple)
-
+
#-------------------------------------------
# "Test copying objects to the same file "
#
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index 16854a9..d64d8b2 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -240,49 +240,21 @@
# copy test files from source to build dir
#
foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #message (STATUS " Copying ${fname}")
- add_custom_command (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${h5_tstfiles} ${dest}
- )
- endforeach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ get_filename_component(fname "${h5_tstfiles}" NAME)
+ HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5diff_files")
+ endforeach ()
#
# Overwrite system dependent files (Windows) and not VS2015
#
if (WIN32 AND MSVC_VERSION LESS 1900)
- add_custom_command (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt
- )
-
- add_custom_command (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt
- )
- add_custom_command (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt
- )
-
- add_custom_command (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
- )
- endif (WIN32 AND MSVC_VERSION LESS 1900)
+ foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
+ get_filename_component(fname "${h5_tstfiles}" NAME)
+ HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5diff_files")
+ endforeach ()
+ endif ()
+ add_custom_target(h5diff_files ALL COMMENT "Copying files needed by h5diff tests" DEPENDS ${h5diff_files_list})
##############################################################################
##############################################################################
@@ -297,10 +269,10 @@
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DIFF-${resultfile}-clear-objects
@@ -323,7 +295,7 @@
endif (HDF5_ENABLE_USING_MEMCHECKER)
if (H5_HAVE_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
- endif (H5_HAVE_PARALLEL)
+ endif ()
ENDMACRO (ADD_H5_TEST file)
MACRO (ADD_PH5_TEST resultfile resultcode)
@@ -333,10 +305,10 @@
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME PH5DIFF-${resultfile}-clear-objects
@@ -375,18 +347,18 @@
# if there was a previous test
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
set_tests_properties (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
@@ -1075,8 +1047,10 @@ ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
# 11. floating point comparison
+# double value
ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2)
+# float value
ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2)
# with --use-system-epsilon for double value. expect less differences
@@ -1321,7 +1295,7 @@ ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
# ##############################################################################
-# # Exclude path (--exclude-path)
+# # Exclude objects (--exclude-path)
# ##############################################################################
#
# Same structure, same names and different value.
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index cc39f73..d563e44 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -4,7 +4,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
@@ -61,6 +61,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintarray.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdints.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex2.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl
@@ -172,6 +173,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlenstr_array.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl
@@ -220,6 +222,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex2.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
@@ -284,6 +287,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlenstr_array.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5
@@ -323,76 +327,41 @@
#
foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
get_filename_component (fname "${tst_h5_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #message (STATUS " Copying ${tst_h5_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
-
+
foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
if (WIN32)
file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
else (WIN32)
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files")
endif (WIN32)
endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
foreach (tst_other_file ${HDF5_REFERENCE_FILES})
get_filename_component (fname "${tst_other_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #message (STATUS " Copying ${tst_other_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_other_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_other_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
endforeach (tst_other_file ${HDF5_REFERENCE_FILES})
foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
get_filename_component (fname "${tst_error_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #message (STATUS " Copying ${tst_error_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_error_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_error_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
endforeach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
# --------------------------------------------------------------------
# Special file handling
# --------------------------------------------------------------------
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
- )
-
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
+
if (WIN32)
file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
else (WIN32)
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files")
endif (WIN32)
-
+ add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -737,7 +706,7 @@
add_test (
NAME H5DUMP-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
h5dump-help.out
charsets.out
charsets.out.err
@@ -846,6 +815,8 @@
tcomp-4.out.err
tcompact.out
tcompact.out.err
+ tcompound_complex.out
+ tcompound_complex.out.err
tcontents.out
tcontents.out.err
tcontiguos.out
@@ -1062,6 +1033,8 @@
tvldtypes4.out.err
tvldtypes5.out
tvldtypes5.out.err
+ tvlenstr_array.out
+ tvlenstr_array.out.err
tvlstr.out
tvlstr.out.err
tvms.out
@@ -1094,9 +1067,9 @@
ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o)
ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o)
-
+
ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o)
-
+
# test for maximum display datasets
ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5)
@@ -1166,10 +1139,11 @@
# test for named data types
ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5)
ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5)
- # test for unamed type
+ # test for unamed type
ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5")
# test complicated compound datatype
ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
+ ADD_H5_TEST (tcompound_complex2 0 --enable-error-stack tcompound_complex2.h5)
# tests for bitfields and opaque data types
ADD_H5_TEST (tbitnopaque 0 --enable-error-stack tbitnopaque.h5)
@@ -1188,7 +1162,7 @@
# test for loop detection
ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5)
- # test for string
+ # test for string
ADD_H5_TEST (tstr-1 0 --enable-error-stack tstr.h5)
ADD_H5_TEST (tstr-2 0 --enable-error-stack tstr2.h5)
@@ -1204,6 +1178,7 @@
#test for file with variable length string data
ADD_H5_TEST (tvlstr 0 --enable-error-stack tvlstr.h5)
+ ADD_H5_TEST (tvlenstr_array 0 --enable-error-stack tvlenstr_array.h5)
# test for files with array data
ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5)
@@ -1221,7 +1196,7 @@
#ADD_H5_MASK_TEST (tstarfile 0 --enable-error-stack -H -d Dataset1 tarr*.h5)
#ADD_H5_MASK_TEST (tqmarkfile 0 --enable-error-stack -H -d Dataset1 tarray?.h5)
ADD_H5_TEST (tmultifile 0 --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5)
-
+
# test for files with empty data
ADD_H5_TEST (tempty 0 --enable-error-stack tempty.h5)
@@ -1287,7 +1262,7 @@
ADD_H5_TEST (tcontiguos 0 --enable-error-stack -H -p -d contiguous tfilters.h5)
# chunked
ADD_H5_TEST (tchunked 0 --enable-error-stack -H -p -d chunked tfilters.h5)
- # external
+ # external
ADD_H5_TEST (texternal 0 --enable-error-stack -H -p -d external tfilters.h5)
# fill values
@@ -1355,7 +1330,7 @@
# don't have). Do this by searching H5pubconf.h to see which
# filters are defined.
-# detect whether the encoder is present.
+# detect whether the encoder is present.
if (H5_HAVE_FILTER_DEFLATE)
set (USE_FILTER_DEFLATE "true")
endif (H5_HAVE_FILTER_DEFLATE)
@@ -1376,12 +1351,12 @@
# test for displaying objects with very long names
ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
- # dimensions over 4GB, print boundary
+ # dimensions over 4GB, print boundary
ADD_H5_TEST (tbigdims 0 --enable-error-stack -d dset4gb -s 4294967284 -c 22 tbigdims.h5)
# hyperslab read
ADD_H5_TEST (thyperslab 0 --enable-error-stack thyperslab.h5)
-
+
# test for displaying dataset and attribute of null space
ADD_H5_TEST (tnullspace 0 --enable-error-stack tnullspace.h5)
@@ -1415,9 +1390,10 @@
ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # test for dataset region references
+ # test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
+ ADD_H5_TEST (tattrreg 0 --enable-error-stack tattrreg.h5)
ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5)
ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
@@ -1438,7 +1414,7 @@
# tests for link references and order
ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5)
ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5)
-
+
# tests for floating point user defined printf format
ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5)
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index e76fa0e..72f8dfb 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -86,41 +86,21 @@
)
foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
- GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #message (STATUS " Copying ${pbits_h5_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${pbits_h5_file} ${dest}
- )
+ get_filename_component(fname "${pbits_h5_file}" NAME)
+ HDFTEST_COPY_FILE("${pbits_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
foreach (ddl_pbits ${HDF5_REFERENCE_PBITS})
- GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #message (STATUS " Copying ${ddl_pbits}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits} ${ddldest}
- )
+ get_filename_component(fname "${ddl_pbits}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS})
foreach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
- GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #message (STATUS " Copying ${ddl_pbits}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits} ${ddldest}
- )
+ get_filename_component(fname "${ddl_pbits}" NAME)
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ add_custom_target(h5dump_pbits_files ALL COMMENT "Copying files needed by h5dump_pbits tests" DEPENDS ${h5dump_pbits_files_list})
##############################################################################
##############################################################################
@@ -135,10 +115,10 @@
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_pbits_test}" STREQUAL "")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
- endif (NOT "${last_pbits_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-${resultfile}-clear-objects
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index 0a667c4..44d24df 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -128,29 +128,16 @@
)
foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #message (STATUS " Copying ${tst_xml_h5_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
- )
+ get_filename_component(fname "${tst_xml_h5_file}" NAME)
+ HDFTEST_COPY_FILE("${tst_xml_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files")
endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
-
+
foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #message (STATUS " Copying ${tst_xml_other_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
- )
+ get_filename_component(fname "${tst_xml_other_file}" NAME)
+ HDFTEST_COPY_FILE("${tst_xml_other_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files")
endforeach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
-
+ add_custom_target(h5dump_xml_files ALL COMMENT "Copying files needed by h5dump_xml tests" DEPENDS ${h5dump_xml_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -176,10 +163,10 @@
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_xml_test}" STREQUAL "")
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
- endif (NOT "${last_xml_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-XML-${resultfile}-clear-objects
@@ -204,16 +191,16 @@
##############################################################################
##############################################################################
-### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
-
+
if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5DUMP-XML-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tall.h5.out
tall.h5.out.err
tall-2A.h5.out
@@ -401,7 +388,7 @@
ADD_XML_H5_TEST (tempty.h5 0 tempty.h5)
ADD_XML_H5_TEST (tnamed_dtype_attr.h5 0 tnamed_dtype_attr.h5)
##Test dataset and attribute of null space. Commented out:
- ## wait until the XML schema is updated for null space.
+ ## wait until the XML schema is updated for null space.
## ADD_XML_H5_TEST (tnullspace.h5 0 tnulspace.h5)
## So is dataspace with 0 dimension size.
## ADD_XML_H5_TEST (zerodim.h5 0 zerodim.h5)
@@ -414,7 +401,7 @@
ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
## Some of these combinations are syntactically correct but
- ## the URLs are dummies
+ ## the URLs are dummies
ADD_XML_H5_TEST (tempty-ns.h5 0 -X thing: tempty.h5)
ADD_XML_H5_TEST (tempty-ns-2.h5 0 --xml-ns=thing: tempty.h5)
ADD_XML_H5_TEST (tempty-nons-uri.h5 0 --xml-ns=: --xml-dtd=http://somewhere.net tempty.h5)
@@ -431,4 +418,4 @@
# tests for floating point user defined printf format
ADD_XML_H5_TEST (tfpformat.h5 0 -u -m %.7f tfpformat.h5)
-
+
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 7641de4..a5e8c4e 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -103,6 +103,7 @@ $SRC_H5DUMP_TESTFILES/tcmpdattrintsize.h5
$SRC_H5DUMP_TESTFILES/tcmpdintsize.h5
$SRC_H5DUMP_TESTFILES/tcompound.h5
$SRC_H5DUMP_TESTFILES/tcompound_complex.h5
+$SRC_H5DUMP_TESTFILES/tcompound_complex2.h5
$SRC_H5DUMP_TESTFILES/tdatareg.h5
$SRC_H5DUMP_TESTFILES/tdset.h5
$SRC_H5DUMP_TESTFILES/tempty.h5
@@ -168,6 +169,7 @@ $SRC_H5DUMP_TESTFILES/tvldtypes2.h5
$SRC_H5DUMP_TESTFILES/tvldtypes3.h5
$SRC_H5DUMP_TESTFILES/tvldtypes4.h5
$SRC_H5DUMP_TESTFILES/tvldtypes5.h5
+$SRC_H5DUMP_TESTFILES/tvlenstr_array.h5
$SRC_H5DUMP_TESTFILES/tvlstr.h5
$SRC_H5DUMP_TESTFILES/tvms.h5
"
@@ -227,6 +229,7 @@ $SRC_H5DUMP_TESTFILES/tcomp-1.ddl
$SRC_H5DUMP_TESTFILES/tcomp-2.ddl
$SRC_H5DUMP_TESTFILES/tcomp-3.ddl
$SRC_H5DUMP_TESTFILES/tcomp-4.ddl
+$SRC_H5DUMP_TESTFILES/tcompound_complex2.ddl
$SRC_H5DUMP_TESTFILES/tcompact.ddl
$SRC_H5DUMP_TESTFILES/tcontents.ddl
$SRC_H5DUMP_TESTFILES/tcontiguos.ddl
@@ -340,6 +343,7 @@ $SRC_H5DUMP_TESTFILES/tvldtypes2.ddl
$SRC_H5DUMP_TESTFILES/tvldtypes3.ddl
$SRC_H5DUMP_TESTFILES/tvldtypes4.ddl
$SRC_H5DUMP_TESTFILES/tvldtypes5.ddl
+$SRC_H5DUMP_TESTFILES/tvlenstr_array.ddl
$SRC_H5DUMP_TESTFILES/tvlstr.ddl
$SRC_H5DUMP_TESTFILES/tvms.ddl
$SRC_H5DUMP_TESTFILES/twidedisplay.ddl
@@ -1032,6 +1036,9 @@ TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path
TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5
# test complicated compound datatype
TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
+TOOLTEST tcompound_complex.ddl --enable-error-stack tcompound_complex2.h5
+# tests for bitfields and opaque data types
+TOOLTEST tbitnopaque.ddl --enable-error-stack tbitnopaque.h5
#test for the nested compound type
TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5
@@ -1064,6 +1071,7 @@ TOOLTEST tvldtypes5.ddl --enable-error-stack tvldtypes5.h5
#test for file with variable length string data
TOOLTEST tvlstr.ddl --enable-error-stack tvlstr.h5
+TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5
# test for files with array data
TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 6986aee..39217be 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -63,38 +63,18 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (conf_file ${HDF5_REFERENCE_CONF_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
- #message (STATUS " Copying ${conf_file}")
- add_custom_command (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file}" "${PROJECT_BINARY_DIR}/testfiles/${conf_file}" "h5import_files")
endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES})
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #message (STATUS " Copying ${txt_file}")
- add_custom_command (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
+ add_custom_target(h5import_files ALL COMMENT "Copying files needed by h5import tests" DEPENDS ${h5import_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -106,7 +86,7 @@
add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5IMPORT-${testname}-clear-objects
@@ -196,7 +176,7 @@
)
endif ("${ARGN}" STREQUAL "BINARY")
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
-
+
add_test (
NAME H5IMPORT-DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -253,7 +233,7 @@
add_test (
NAME H5IMPORT-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
binfp64.bin
binin8.bin
binin8w.bin
@@ -412,7 +392,7 @@
add_test (
NAME H5IMPORT-h5importtest-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
binfp64.bin
binin8.bin
binin8w.bin
@@ -432,22 +412,22 @@
# ----- TESTING "ASCII I32 rank 3 - Output BE " ;
ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
- # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
+ # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5)
- # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
+ # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5)
- # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
+ # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5)
- # ----- TESTING "ASCII UI32 - rank 3 - Output BE"
+ # ----- TESTING "ASCII UI32 - rank 3 - Output BE"
ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5)
- # ----- TESTING "ASCII F32 - rank 3 - Output LE "
+ # ----- TESTING "ASCII F32 - rank 3 - Output LE "
ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5)
- # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
+ # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5)
# ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
@@ -458,7 +438,7 @@
ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
endif (NOT USE_FILTER_DEFLATE)
- # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
+ # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5)
if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
@@ -466,27 +446,27 @@
ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
endif (NOT USE_FILTER_DEFLATE)
- # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
+ # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5)
ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY)
- # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
+ # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5)
ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY)
- # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
+ # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5)
ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY)
- # ----- TESTING "BINARY UI32 - rank 3 - Output LE "
+ # ----- TESTING "BINARY UI32 - rank 3 - Output LE "
ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5)
ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY)
- # ----- TESTING "STR"
+ # ----- TESTING "STR"
ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5)
ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5)
- # ----- TESTING "BINARY I8 CR LF EOF"
+ # ----- TESTING "BINARY I8 CR LF EOF"
ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5)
ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY)
diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
index b5dc256..6752c9a 100644
--- a/tools/h5jam/CMakeTests.cmake
+++ b/tools/h5jam/CMakeTests.cmake
@@ -22,27 +22,14 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5jam
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5jam_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #message (STATUS " Copying ${txt_file}")
- add_custom_command (
- TARGET h5jam
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5jam_files")
endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
-
+ add_custom_target(h5jam_files ALL COMMENT "Copying files needed by h5jam tests" DEPENDS ${h5jam_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -306,7 +293,7 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5JAM-${testname}_NONE-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
+ COMMAND ${CMAKE_COMMAND} -E remove
${chkfile} ${chkfile}.cpy.h5
)
add_test (
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index a42fa17..eda990d 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -96,18 +96,11 @@
# copy the list of test files
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #message (STATUS " Copying ${listfiles} to ${dest}")
- add_custom_command (
- TARGET h5ls
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${listfiles} ${dest}
- )
+ get_filename_component(fname "${listfiles}" NAME)
+ HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5ls_files")
endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ add_custom_target(h5ls_files ALL COMMENT "Copying files needed by h5ls tests" DEPENDS ${h5ls_files_list})
-
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -121,10 +114,10 @@
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} STREQUAL "1")
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5LS-${resultfile}-clear-objects
@@ -157,7 +150,7 @@
add_test (
NAME H5LS-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
help-1.out
help-1.out.err
help-2.out
@@ -323,7 +316,7 @@
ADD_H5_TEST (textlinksrc-6-old 0 -w80 -E textlinksrc.h5)
ADD_H5_TEST (textlinksrc-7-old 0 -w80 -E textlinksrc.h5/ext_link1)
- # tests for no-dangling-links
+ # tests for no-dangling-links
# if this option is given on dangling link, h5ls should return exit code 1
# when used alone , expect to print out help and return exit code 1
ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5)
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index cfb1ae9..b87de7b 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -14,14 +14,14 @@
multi
family
)
-
+
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
add_test (
- NAME H5REPACK-VFD-${vfdname}-h5repacktest
+ NAME H5REPACK-VFD-${vfdname}-h5repacktest
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
-D "TEST_ARGS:STRING="
@@ -37,7 +37,7 @@
set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
ENDMACRO (ADD_VFD_TEST)
endif (HDF5_TEST_VFD)
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -94,16 +94,10 @@
)
foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${h5_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5repack
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${h5_file} ${dest}
- )
+ get_filename_component(fname "${h5_file}" NAME)
+ HDFTEST_COPY_FILE("${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5repack_files")
endforeach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ add_custom_target(h5repack_files ALL COMMENT "Copying files needed by h5repack tests" DEPENDS ${h5repack_files_list})
##############################################################################
##############################################################################
@@ -118,7 +112,7 @@
set_tests_properties (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5REPACK-${testname}")
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -157,7 +151,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK_OLD-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -181,7 +175,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -220,7 +214,7 @@
endif (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
endif ("${testtype}" STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
@@ -239,7 +233,7 @@
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_DMP-h5dump-${testname}
@@ -273,7 +267,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -296,13 +290,13 @@
else ("${resultcode}" STREQUAL "0")
if ("${testfilter}" STREQUAL "CHUNKED")
set (nottestfilter "(CONTIGUOUS|COMPACT)")
- endif ("${testfilter}" STREQUAL "CHUNKED")
+ endif ()
if ("${testfilter}" STREQUAL "CONTIGUOUS")
set (nottestfilter "(CHUNK|COMPACT)")
- endif ("${testfilter}" STREQUAL "CONTIGUOUS")
+ endif ()
if ("${testfilter}" STREQUAL "COMPACT")
set (nottestfilter "(CONTIGUOUS|CHUNK)")
- endif ("${testfilter}" STREQUAL "COMPACT")
+ endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -328,7 +322,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK_META-${testname}_M
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
@@ -346,7 +340,7 @@
add_test (
NAME H5REPACK_UD-${testname}-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
testfiles/out-${testname}.${resultfile}
testfiles/${testname}.${resultfile}.out
testfiles/${testname}.${resultfile}.out.err
@@ -392,7 +386,7 @@
##############################################################################
# --------------------------------------------------------------------
- # test file names
+ # test file names
# --------------------------------------------------------------------
set (INFO_FILE testfiles/h5repack.info)
@@ -420,7 +414,7 @@
add_test (
NAME H5REPACK-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/h5dump-help.out
./testfiles/h5repack_filters.h5-gzip_verbose_filters.out
./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err
@@ -560,7 +554,7 @@
h5repack_attr_out.h5
h5repack_attr_refs.h5
h5repack_big.h5
- h5repack_deflate.h5
+ h5repack_deflate.h5
h5repack_deflate_out.h5
h5repack_early2.h5
h5repack_early.h5
@@ -588,7 +582,7 @@
h5repack_refs.h5
h5repack_shuffle.h5
h5repack_shuffle_out.h5
- h5repack_soffset.h5
+ h5repack_soffset.h5
h5repack_soffset_out.h5
h5repack_szip.h5
h5repack_szip_out.h5
@@ -628,14 +622,14 @@
# Each run generates "<file>.out.h5" and the tool h5diff is used to
# compare the input and output files
#
-# the tests are the same as the program h5repacktst, but run from the CLI
+# the tests are the same as the program h5repacktst, but run from the CLI
#
# See which filters are usable (and skip tests for filters we
# don't have). Do this by searching H5pubconf.h to see which
# filters are defined.
-# detect whether the encoder is present.
+# detect whether the encoder is present.
set (USE_FILTER_SZIP_ENCODER "no")
if (HDF5_ENABLE_SZIP_ENCODING)
set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
@@ -649,7 +643,7 @@
set (USE_FILTER_SZIP "true")
endif (H5_HAVE_FILTER_SZIP)
-# copy files (these files have no filters)
+# copy files (these files have no filters)
ADD_H5_TEST (fill "TEST" ${FILE0})
ADD_H5_TEST (objs "TEST" ${FILE1})
ADD_H5_TEST (attr "TEST" ${FILE2})
@@ -666,8 +660,8 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
-
-# gzip for all
+
+# gzip for all
set (arg ${FILE4} -f GZIP=1)
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
@@ -681,7 +675,7 @@
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
+ ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
# szip for all
set (arg ${FILE4} -f SZIP=8,NN)
@@ -689,16 +683,16 @@
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
+ ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
# shuffle with individual object
set (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10)
- ADD_H5_TEST (shuffle_individual "TEST" ${arg})
+ ADD_H5_TEST (shuffle_individual "TEST" ${arg})
# shuffle for all
set (arg ${FILE4} -f SHUF)
ADD_H5_TEST (shuffle_all "TEST" ${arg})
-
+
# fletcher32 with individual object
set (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10)
ADD_H5_TEST (fletcher_individual "TEST" ${arg})
@@ -722,7 +716,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
-
+
###########################################################
# the following tests assume the input files have filters
###########################################################
@@ -734,7 +728,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
-
+
# szip remove
set (arg ${FILE7} --filter=dset_szip:NONE)
set (TESTTYPE "TEST")
@@ -742,7 +736,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
-
+
# deflate copy
set (arg ${FILE8})
set (TESTTYPE "TEST")
@@ -758,7 +752,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
-
+
# shuffle copy
set (arg ${FILE9})
ADD_H5_TEST (shuffle_copy "TEST" ${arg})
@@ -813,14 +807,14 @@
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
+ ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
set (arg ${FILE7} -f dset_szip:GZIP=1)
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
+ ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
#limit
set (arg ${FILE4} -f GZIP=1 -m 1024)
@@ -836,7 +830,7 @@
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
+ ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
#########################################################
# layout options (these files have no filters)
@@ -865,18 +859,18 @@
ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA)
ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA)
-#---------------------------------------------------------------------------
-# Test file contains chunked datasets (need multiple dsets) with
+#---------------------------------------------------------------------------
+# Test file contains chunked datasets (need multiple dsets) with
# unlimited max dims. (HDFFV-7933)
# Use first dset to test.
#---------------------------------------------------------------------------
# chunk to chunk - specify chunk dim bigger than any current dim
ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
-# chunk to contiguous
+# chunk to contiguous
ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
-# chunk to compact - convert big dataset (should be > 64k) for this purpose,
+# chunk to compact - convert big dataset (should be > 64k) for this purpose,
# should remain as original layout (chunk)
ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
@@ -884,7 +878,7 @@
# Test -f for some specific cases. Chunked dataset with unlimited max dims.
# (HDFFV-8012)
#--------------------------------------------------------------------------
-# - should not fail
+# - should not fail
# - should not change max dims from unlimit
# chunk dim is bigger than dataset dim. ( dset size < 64k )
@@ -900,13 +894,13 @@
ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
#--------------------------------------------------------------------------
-# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
+# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
# (dset size < 64K) and with unlimited max dims on a condition as follow.
# (HDFFV-8214)
#--------------------------------------------------------------------------
# chunk dim is bigger than dataset dim. should succeed.
ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
-# chunk dim is smaller than dataset dim. should succeed.
+# chunk dim is smaller than dataset dim. should succeed.
ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
@@ -975,11 +969,11 @@
ADD_H5_TEST (bug1814 "TEST" ${FILE_REF})
# test attribute with various references (bug1797 / HDFFV-5932)
-# the references in attribute of compund or vlen datatype
+# the references in attribute of compund or vlen datatype
ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF})
-# Add test for memory leak in attirbute. This test is verified by CTEST.
-# 1. leak from vlen string
+# Add test for memory leak in attirbute. This test is verified by CTEST.
+# 1. leak from vlen string
# 2. leak from compound type without reference member
# (HDFFV-7840, )
# Note: this test is experimental for sharing test file among tools
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index 4175eb2..48622c9 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -4,7 +4,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
@@ -49,27 +49,14 @@
)
foreach (ddl_file ${HDF5_REFERENCE_FILES})
- set (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
- #message (STATUS " Translating ${ddl_file}")
- add_custom_command (
- TARGET h5stat
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/${ddl_file}" "h5stat_files")
endforeach (ddl_file ${HDF5_REFERENCE_FILES})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5stat
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5stat_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
+ add_custom_target(h5stat_files ALL COMMENT "Copying files needed by h5stat tests" DEPENDS ${h5stat_files_list})
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -118,7 +105,7 @@
add_test (
NAME H5STAT-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
h5stat_help1.out
h5stat_help1.out.err
h5stat_help2.out
@@ -214,7 +201,7 @@
ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5)
ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5)
#
-# Tests for -l (--links) option on h5stat_threshold.h5:
+# Tests for -l (--links) option on h5stat_threshold.h5:
# -l 0 (incorrect threshold value)
# -g -l 8
# --links=8
@@ -224,7 +211,7 @@
ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5)
ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5)
#
-# Tests for -l (--links) option on h5stat_newgrat.h5:
+# Tests for -l (--links) option on h5stat_newgrat.h5:
# -g
# -g -l 40000
ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5)
@@ -254,4 +241,3 @@
# -A -a 100
ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5)
#
- \ No newline at end of file
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
index d28b744..6822be5 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -4,7 +4,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -30,16 +30,10 @@
)
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5repart
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5repart_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
+ add_custom_target(h5repart_files ALL COMMENT "Copying files needed by h5repart tests" DEPENDS ${h5repart_files_list})
+
set (HDF5_MKGRP_TEST_FILES
#h5mkgrp_help.txt
#h5mkgrp_version
@@ -61,22 +55,12 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
- #message (STATUS " Copying ${h5_mkgrp_file}")
- add_custom_command (
- TARGET h5mkgrp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}" "h5mkgrp_files")
endforeach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- add_custom_command (
- TARGET h5mkgrp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt
- )
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt" "${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt" "h5mkgrp_files")
+ add_custom_target(h5mkgrp_files ALL COMMENT "Copying files needed by h5mkgrp tests" DEPENDS ${h5mkgrp_files_list})
+
configure_file (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
##############################################################################
@@ -90,14 +74,14 @@
add_test (
NAME H5MKGRP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
+ -E remove
+ ${resultfile}.h5
${resultfile}.out
${resultfile}.out.err
)
set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
+
add_test (
NAME H5MKGRP-${resultfile}
COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
@@ -132,8 +116,8 @@
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
+ -E remove
+ ${resultfile}.h5
${resultfile}.out
${resultfile}.out.err
)
@@ -159,11 +143,12 @@
##############################################################################
##############################################################################
+ ###################### H5REPART #########################
# Remove any output file left over from previous test run
add_test (
NAME H5REPART-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
fst_family00000.h5
scd_family00000.h5
scd_family00001.h5
@@ -175,7 +160,7 @@
set_tests_properties (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "H5REPART-clearall-objects")
-
+
# repartition family member size to 20,000 bytes.
add_test (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
set_tests_properties (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
@@ -195,50 +180,50 @@
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
h5repart_test
)
-
+
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5MKGRP-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
h5mkgrp_help.out
h5mkgrp_help.out.err
h5mkgrp_version.out
h5mkgrp_version.out.err
- h5mkgrp_single.h5
+ h5mkgrp_single.h5
h5mkgrp_single.out
h5mkgrp_single.out.err
- h5mkgrp_single_v.h5
+ h5mkgrp_single_v.h5
h5mkgrp_single_v.out
h5mkgrp_single_v.out.err
- h5mkgrp_single_p.h5
+ h5mkgrp_single_p.h5
h5mkgrp_single_p.out
h5mkgrp_single_p.out.err
- h5mkgrp_single_l.h5
+ h5mkgrp_single_l.h5
h5mkgrp_single_l.out
h5mkgrp_single_l.out.err
- h5mkgrp_several.h5
+ h5mkgrp_several.h5
h5mkgrp_several.out
h5mkgrp_several.out.err
- h5mkgrp_several_v.h5
+ h5mkgrp_several_v.h5
h5mkgrp_several_v.out
h5mkgrp_several_v.out.err
- h5mkgrp_several_p.h5
+ h5mkgrp_several_p.h5
h5mkgrp_several_p.out
h5mkgrp_several_p.out.err
- h5mkgrp_several_l.h5
+ h5mkgrp_several_l.h5
h5mkgrp_several_l.out
h5mkgrp_several_l.out.err
- h5mkgrp_nested_p.h5
+ h5mkgrp_nested_p.h5
h5mkgrp_nested_p.out
h5mkgrp_nested_p.out.err
- h5mkgrp_nested_lp.h5
+ h5mkgrp_nested_lp.h5
h5mkgrp_nested_lp.out
h5mkgrp_nested_lp.out.err
- h5mkgrp_nested_mult_p.h5
+ h5mkgrp_nested_mult_p.h5
h5mkgrp_nested_mult_p.out
h5mkgrp_nested_mult_p.out.err
- h5mkgrp_nested_mult_lp.h5
+ h5mkgrp_nested_mult_lp.h5
h5mkgrp_nested_mult_lp.out
h5mkgrp_nested_mult_lp.out.err
)
@@ -265,7 +250,7 @@
ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two)
ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two)
- # Create various nested groups
+ # Create various nested groups
ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two)
ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two)
ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four)
diff --git a/tools/perform/CMakeTests.cmake b/tools/perform/CMakeTests.cmake
index 6927124..0ea40a3 100644
--- a/tools/perform/CMakeTests.cmake
+++ b/tools/perform/CMakeTests.cmake
@@ -5,12 +5,8 @@
##############################################################################
##############################################################################
-add_custom_command (
- TARGET zip_perf
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5
-)
+HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfilters.h5" "${PROJECT_BINARY_DIR}/tfilters.h5" "zip_perf_files")
+add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf tests" DEPENDS ${zip_perf_list})
#-----------------------------------------------------------------------------
# Add Tests
@@ -20,7 +16,7 @@ add_custom_command (
add_test (
NAME PERFORM_h5perform-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
chunk.h5
iopipe.h5
iopipe.raw