diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-07-12 17:16:00 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-07-12 17:16:00 (GMT) |
commit | d6d7e62d0b0920c6f63f111b60a22f5a9a50eda5 (patch) | |
tree | dcdf7c925cb07dc309780d401bf8fb03334c415a /tools/misc | |
parent | 79d909194836c3847669acb78cad15d743f8a135 (diff) | |
download | hdf5-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/misc')
-rw-r--r-- | tools/misc/CMakeTests.cmake | 77 |
1 files changed, 31 insertions, 46 deletions
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) |