diff options
Diffstat (limited to 'tools/h5repack/CMakeTests.cmake')
-rw-r--r-- | tools/h5repack/CMakeTests.cmake | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index d5379a4..d0aa6c8 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -121,19 +121,14 @@ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/3_1_vds.h5-vds_chunk2x5x8-v.ddl ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_compa-v.ddl ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/4_vds.h5-vds_conti-v.ddl + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_zero.tst ) 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} - ) + 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}) ############################################################################## ############################################################################## @@ -148,7 +143,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 ( @@ -187,7 +182,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} @@ -211,7 +206,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} @@ -250,7 +245,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) @@ -284,7 +279,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER) if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () endif ("${testtype}" STREQUAL "SKIP") ENDMACRO (ADD_H5_MASK_TEST) @@ -303,7 +298,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} @@ -337,7 +332,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} @@ -360,13 +355,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}" @@ -402,7 +397,7 @@ set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS ${last_test}) - endif (NOT "${last_test}" STREQUAL "") + endif () add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP COMMAND "${CMAKE_COMMAND}" @@ -427,7 +422,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 @@ -1151,6 +1146,12 @@ ############################################################################## ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9) ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) + # check for no parameters + set (TESTRETVAL 255) + if (WIN32) + set (TESTRETVAL -1) + endif() + ADD_H5_CMP_TEST (plugin_zero "" "TEST" ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0) if (HDF5_TEST_VFD) # Run test with different Virtual File Driver |