diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-10-28 16:10:18 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-10-28 16:10:18 (GMT) |
commit | a654e61d6c559cef47732fd2d6ef3395237d5df9 (patch) | |
tree | 02faf0e6bc37d6b2062bf2556d8ff2f192dac739 /tools | |
parent | 52ddd8e3297db991b1388d1e11f330eaaf13a035 (diff) | |
download | hdf5-a654e61d6c559cef47732fd2d6ef3395237d5df9.zip hdf5-a654e61d6c559cef47732fd2d6ef3395237d5df9.tar.gz hdf5-a654e61d6c559cef47732fd2d6ef3395237d5df9.tar.bz2 |
[svn-r19691] Added new h5copy test
Tested: local linux
Diffstat (limited to 'tools')
-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) |