diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-03-29 17:58:33 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-03-29 17:58:33 (GMT) |
commit | e2d24714fa0fe6a85c9a12ec2fcf996373476150 (patch) | |
tree | afcbeb723dfee451a31e61baa0ffe0d751e31171 /tools/misc | |
parent | 466c13959751c5a32260bd5c1345535ca3cd0e64 (diff) | |
download | hdf5-e2d24714fa0fe6a85c9a12ec2fcf996373476150.zip hdf5-e2d24714fa0fe6a85c9a12ec2fcf996373476150.tar.gz hdf5-e2d24714fa0fe6a85c9a12ec2fcf996373476150.tar.bz2 |
[svn-r20372] Separate no option test within ADD_TEST so depends behaves correctly
Diffstat (limited to 'tools/misc')
-rw-r--r-- | tools/misc/CMakeLists.txt | 82 |
1 files changed, 53 insertions, 29 deletions
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 6b7fbb7..b4e7078 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -125,46 +125,70 @@ 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} - COMMAND $<TARGET_FILE:h5mkgrp> ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN} + 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 ) - ENDIF (NOT ${resultoption} STREQUAL " ") - 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" + NAME H5MKGRP-${resultfile} + COMMAND $<TARGET_FILE:h5mkgrp> ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 ${ARGN} ) - SET_TESTS_PROPERTIES (H5MKGRP-H5LS-${resultfile}${resultoption} PROPERTIES DEPENDS H5MKGRP-${resultfile}${resultoption}) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + 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 " ") ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption) MACRO (ADD_H5_CMP resultfile resultcode) ADD_TEST ( - NAME H5MKGRP-clear-${resultfile} + NAME H5MKGRP_CMP-clear-${resultfile} COMMAND ${CMAKE_COMMAND} -E remove ${PROJECT_BINARY_DIR}/../testfiles/${resultfile}.h5 @@ -172,10 +196,10 @@ IF (BUILD_TESTING) ${PROJECT_BINARY_DIR}/${resultfile}.out.err ) IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5MKGRP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN}) + ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN}) ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( - NAME H5MKGRP-${resultfile} + NAME H5MKGRP_CMP-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>" -D "TEST_ARGS:STRING=${ARGN}" @@ -186,7 +210,7 @@ IF (BUILD_TESTING) -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-clear-${resultfile}) + SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-clear-${resultfile}) ENDMACRO (ADD_H5_CMP resultfile resultcode) ############################################################################## |