diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-03-31 20:39:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-03-31 20:39:18 (GMT) |
commit | f4e7559bd2d8bbd59535cbcafab78e162a6bffb6 (patch) | |
tree | b4339300a7d08fe64266ad183213da8a38fb986e /tools/misc | |
parent | 9c0a2b214519c6f0508964981be19bf2e3054e35 (diff) | |
download | hdf5-f4e7559bd2d8bbd59535cbcafab78e162a6bffb6.zip hdf5-f4e7559bd2d8bbd59535cbcafab78e162a6bffb6.tar.gz hdf5-f4e7559bd2d8bbd59535cbcafab78e162a6bffb6.tar.bz2 |
[svn-r20383] Description:
Bring r19714:20382 from trunk to revise_chunks branch
Tested:
Linux 2.6/64 (chicago)
Diffstat (limited to 'tools/misc')
-rw-r--r-- | tools/misc/CMakeLists.txt | 125 |
1 files changed, 80 insertions, 45 deletions
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 6694458..b4e7078 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -12,15 +12,15 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- #-- Misc Executables ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) -H5_NAMING (h5debug ${LIB_TYPE}) +TARGET_NAMING (h5debug ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_EXECUTABLE (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) -H5_NAMING (h5repart ${LIB_TYPE}) +TARGET_NAMING (h5repart ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) ADD_EXECUTABLE (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) -H5_NAMING (h5mkgrp ${LIB_TYPE}) +TARGET_NAMING (h5mkgrp ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES @@ -41,13 +41,13 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c) - H5_NAMING (h5repart_gentest ${LIB_TYPE}) + TARGET_NAMING (h5repart_gentest ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>) ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c) - H5_NAMING (h5repart_test ${LIB_TYPE}) + TARGET_NAMING (h5repart_test ${LIB_TYPE}) TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) # -------------------------------------------------------------------- @@ -125,53 +125,92 @@ IF (BUILD_TESTING) ############################################################################## MACRO (ADD_H5_TEST resultfile resultcode resultoption) - ADD_TEST ( - NAME H5MKGRP-clear-${resultfile}${resultoption} - COMMAND ${CMAKE_COMMAND} - -E remove - ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 - ${PROJECT_BINARY_DIR}/${resultfile}.out - ${PROJECT_BINARY_DIR}/${resultfile}.out.err - ) IF (NOT ${resultoption} STREQUAL " ") ADD_TEST ( + NAME H5MKGRP-clear-${resultfile}${resultoption} + COMMAND ${CMAKE_COMMAND} + -E remove + ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 + ${PROJECT_BINARY_DIR}/${resultfile}.out + ${PROJECT_BINARY_DIR}/${resultfile}.out.err + ) + ADD_TEST ( NAME H5MKGRP-${resultfile}${resultoption} COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN} ) + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile}${resultoption}) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5MKGRP-H5LS-${resultfile}${resultoption} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" + -D "TEST_ARGS:STRING=-v;-r;../testfiles/${resultfile}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_MASK_MOD=true" + -D "TEST_REFERENCE=${resultfile}.ls" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5MKGRP-H5LS-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-${resultfile}${resultoption}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ELSE (NOT ${resultoption} STREQUAL " ") ADD_TEST ( - NAME H5MKGRP-${resultfile}${resultoption} + NAME H5MKGRP-clear-${resultfile} + COMMAND ${CMAKE_COMMAND} + -E remove + ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 + ${PROJECT_BINARY_DIR}/${resultfile}.out + ${PROJECT_BINARY_DIR}/${resultfile}.out.err + ) + ADD_TEST ( + NAME H5MKGRP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN} ) + SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile}) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5MKGRP-H5LS-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" + -D "TEST_ARGS:STRING=-v;-r;../testfiles/${resultfile}.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_MASK_MOD=true" + -D "TEST_REFERENCE=${resultfile}.ls" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + SET_TESTS_PROPERTIES (H5MKGRP-H5LS-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}) + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDIF (NOT ${resultoption} STREQUAL " ") - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile}${resultoption}) - ADD_TEST ( - NAME H5MKGRP-H5LS-${resultfile}${resultoption} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" - -D "TEST_ARGS:STRING=-v;-r;../testfiles/${resultfile}.h5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_MASK_MOD=true" - -D "TEST_REFERENCE=${resultfile}.ls" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) - SET_TESTS_PROPERTIES (H5MKGRP-H5LS-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-${resultfile}${resultoption}) ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption) MACRO (ADD_H5_CMP resultfile resultcode) ADD_TEST ( - NAME H5MKGRP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.txt" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + NAME H5MKGRP_CMP-clear-${resultfile} + COMMAND ${CMAKE_COMMAND} + -E remove + ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 + ${PROJECT_BINARY_DIR}/${resultfile}.out + ${PROJECT_BINARY_DIR}/${resultfile}.out.err ) + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN}) + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5MKGRP_CMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.txt" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-clear-${resultfile}) ENDMACRO (ADD_H5_CMP resultfile resultcode) ############################################################################## @@ -201,6 +240,7 @@ IF (BUILD_TESTING) scd_family00002.h5 scd_family00003.h5 ) + SET_TESTS_PROPERTIES (h5repart_5K-clear-objects PROPERTIES DEPENDS h5repart_20K) # repartition family member size to 5 KB. ADD_TEST (NAME h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5) SET_TESTS_PROPERTIES (h5repart_5K PROPERTIES DEPENDS h5repart_5K-clear-objects) @@ -212,24 +252,19 @@ IF (BUILD_TESTING) -E remove family_to_sec2.h5 ) + SET_TESTS_PROPERTIES (h5repart_sec2-clear-objects PROPERTIES DEPENDS h5repart_5K) # convert family file to sec2 file of 20,000 bytes ADD_TEST (NAME h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5) SET_TESTS_PROPERTIES (h5repart_sec2 PROPERTIES DEPENDS h5repart_sec2-clear-objects) # test the output files repartitioned above. ADD_TEST (NAME h5repart_test COMMAND $<TARGET_FILE:h5repart_test>) - SET_TESTS_PROPERTIES (h5repart_test PROPERTIES DEPENDS h5repart_sec2 h5repart_5K h5repart_20K) + SET_TESTS_PROPERTIES (h5repart_test PROPERTIES DEPENDS h5repart_sec2) SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5repart_test ) - # If using memchecker add tests without using scripts - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5MKGRP-help COMMAND h5mkgrp -h) - ADD_TEST (NAME H5MKGRP-version COMMAND h5mkgrp -V) - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - # Check that help & version is displayed properly ADD_H5_CMP (h5mkgrp_help 0 "-h") ADD_H5_CMP (h5mkgrp_version 0 "-V") @@ -264,7 +299,7 @@ ENDIF (BUILD_TESTING) #-----------------------------------------------------------------------------
INSTALL ( TARGETS - h5debug h5repart + h5debug h5repart h5mkgrp RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR}/tools COMPONENT |