diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-03-01 19:20:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-03-01 19:20:20 (GMT) |
commit | 484b1f5cfab2837c8366fc1efd463c8982908e57 (patch) | |
tree | bc6add39ecb38249c184555226f1183d2f7ab993 /tools/h5copy | |
parent | f306642f9a1bcd2a592b1eea6553d94d9d2f6555 (diff) | |
download | hdf5-484b1f5cfab2837c8366fc1efd463c8982908e57.zip hdf5-484b1f5cfab2837c8366fc1efd463c8982908e57.tar.gz hdf5-484b1f5cfab2837c8366fc1efd463c8982908e57.tar.bz2 |
[svn-r20171] Add HDF5_USING_MEMCHECKER guards around script mode ADD_TEST. This will replace the list of ignore tests in CTestCustom.cmake file.
Tested: local linux
Diffstat (limited to 'tools/h5copy')
-rw-r--r-- | tools/h5copy/CMakeLists.txt | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index a2d185a..0cd273c 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -106,18 +106,23 @@ IF (BUILD_TESTING) ENDMACRO (ADD_H5_TEST testname resultcode testfile vparam srcname dstname) MACRO (ADD_H5LS_TEST file filetest) - ADD_TEST ( - NAME H5COPY-H5LS_${file}-${filetest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" - -D "TEST_ARGS=-Svr;./testfiles/${file}.out.h5" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${file}.out.out" - -D "TEST_EXPECT=0" - -D "TEST_REFERENCE=./testfiles/${file}.out.ls" - -D "TEST_MASK=true" - -P "${HDF5_RESOURCES_DIR}/runTest.cmake" - ) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5COPY-H5LS_${file}-${filetest} COMMAND $<TARGET_FILE:h5ls> -Svr ./testfiles/${file}.out.h5) + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5COPY-H5LS_${file}-${filetest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" + -D "TEST_ARGS=-Svr;./testfiles/${file}.out.h5" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" + -D "TEST_OUTPUT=./testfiles/${file}.out.out" + -D "TEST_EXPECT=0" + -D "TEST_REFERENCE=./testfiles/${file}.out.ls" + -D "TEST_MASK=true" + -P "${HDF5_RESOURCES_DIR}/runTest.cmake" + ) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5COPY-H5LS_${file}-${filetest} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -125,18 +130,23 @@ IF (BUILD_TESTING) 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" - ) + # If using memchecker add tests without using scripts + IF (HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ${testfile}.h5 -o ./testfiles/${testfile}.out.h5 -${vparam} -s ${srcname} -d ${dstname}) + ELSE (HDF5_ENABLE_USING_MEMCHECKER) + 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" + ) + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") |