summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
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/h5copy
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/h5copy')
-rw-r--r--tools/h5copy/CMakeTests.cmake48
1 files changed, 21 insertions, 27 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 "
#