diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-29 15:43:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-29 15:43:31 (GMT) |
commit | 8e04644abdc73446e85bac72bcced171a927b1f0 (patch) | |
tree | f9c3f389ea4a61030c3c99d20e27882389d0542a /tools/h5copy | |
parent | 059db7a4f22613bffacc60b873fa8c276d6a7cbf (diff) | |
download | hdf5-8e04644abdc73446e85bac72bcced171a927b1f0.zip hdf5-8e04644abdc73446e85bac72bcced171a927b1f0.tar.gz hdf5-8e04644abdc73446e85bac72bcced171a927b1f0.tar.bz2 |
[svn-r19698] Description:
Bring r19668:19697 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Diffstat (limited to 'tools/h5copy')
-rw-r--r-- | tools/h5copy/CMakeLists.txt | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index ccb1466..afb1ca7 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -46,6 +46,7 @@ IF (BUILD_TESTING) h5copy_extlinks_trg.h5 h5copy_ref.h5 h5copytst.h5 + h5copy_misc1.out ) FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") @@ -101,10 +102,9 @@ IF (BUILD_TESTING) ENDIF (NOT ${resultcode} STREQUAL "2") ENDMACRO (ADD_H5_TEST testname resultcode testfile vparam srcname dstname) - - MACRO (ADD_H5LS_TEST file) + MACRO (ADD_H5LS_TEST file filetest) ADD_TEST ( - NAME H5COPY-H5LS_${file} + NAME H5COPY-H5LS_${file}-${filetest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" -D "TEST_ARGS=-Svr;./testfiles/${file}.out.h5" @@ -115,7 +115,22 @@ IF (BUILD_TESTING) -D "TEST_MASK=true" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) - ENDMACRO (ADD_H5LS_TEST file) + ENDMACRO (ADD_H5LS_TEST file filetest) + + MACRO (ADD_H5_CMP_TEST testname resultcode testfile vparam srcname dstname) + ADD_TEST ( + NAME H5COPY-CMP-${testname} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5copy>" + -D "TEST_ARGS=-i;${testfile}.h5;-o;./testfiles/${testfile}.out.h5;-${vparam};-s;${srcname};-d;${dstname}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${testname}.out.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=./testfiles/${testname}.out" + -D "TEST_MASK=true" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ENDMACRO (ADD_H5_CMP_TEST testname resultcode testfile vparam srcname dstname) ############################################################################## ############################################################################## @@ -184,7 +199,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1} vp /grp_nested /G/H/grp_nested) # Verify that the file created above is correct - ADD_H5LS_TEST (${HDF_FILE1}) + ADD_H5LS_TEST (${HDF_FILE1} basic) ############# COPY REFERENCES ############## @@ -202,7 +217,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (region_ref 2 ${HDF_FILE2} v / /COPY ref) # Verify that the file created above is correct - ADD_H5LS_TEST (${HDF_FILE2}) + ADD_H5LS_TEST (${HDF_FILE2} refs) ############# COPY EXT LINKS ############## @@ -241,7 +256,29 @@ IF (BUILD_TESTING) ADD_H5_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE} v /group_ext /copy2_group ext) # Verify that the file created above is correct - ADD_H5LS_TEST (${HDF_EXT_SRC_FILE}) + ADD_H5LS_TEST (${HDF_EXT_SRC_FILE} links) + +############# Test misc. ############## + + ADD_CUSTOM_COMMAND ( + TARGET h5copy + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5 ${PROJECT_BINARY_DIR}/h5copytst.h5 + ) + + # Remove any output file left over from previous test run + ADD_TEST ( + NAME H5COPY-clear-misc + COMMAND ${CMAKE_COMMAND} + -E remove + ./testfiles/${HDF_FILE1}.out.h5 + ./testfiles/${HDF_FILE1}.out.out + ./testfiles/${HDF_FILE1}.out.out.err + ) + + # "Test copying object into group which doesn't exist, without -p" + ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1} v /simple /g1/g2/simple) ENDIF (BUILD_TESTING) |