[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
This commit is contained in:
Allen Byrne 2011-03-01 14:20:20 -05:00
parent f306642f9a
commit 484b1f5cfa
9 changed files with 253 additions and 222 deletions

View File

@ -61,17 +61,19 @@ IF (HDF5_TEST_VFD)
ENDIF (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
ADD_TEST (
NAME VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=cpp_testhdf5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=cpp_testhdf5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver

View File

@ -68,19 +68,21 @@ IF (HDF5_TEST_VFD)
ENDIF (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
FOREACH (test ${H5P_VFD_TESTS})
ADD_TEST (
NAME VFD-${vfdname}-${test}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${test}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
ENDFOREACH (test ${H5P_VFD_TESTS})
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
FOREACH (test ${H5P_VFD_TESTS})
ADD_TEST (
NAME VFD-${vfdname}-${test}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${test}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
ENDFOREACH (test ${H5P_VFD_TESTS})
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)
# Run test with different Virtual File Driver

View File

@ -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 "")

View File

@ -270,18 +270,23 @@ IF (BUILD_TESTING)
##############################################################################
MACRO (ADD_H5_TEST resultfile resultcode)
ADD_TEST (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
-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"
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
-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"
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@ -614,12 +619,6 @@ IF (BUILD_TESTING)
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5DIFF-clearall-objects")
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DIFF-help COMMAND h5diff -h)
ADD_TEST (NAME H5DIFF-normal-mode COMMAND h5diff ${FILE1} ${FILE2})
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# ############################################################################
# # Common usage
# ############################################################################

View File

@ -408,17 +408,22 @@ IF (BUILD_TESTING)
ENDMACRO (ADD_SKIP_H5_TEST)
MACRO (ADD_H5_TEST resultfile resultcode)
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@ -443,22 +448,24 @@ IF (BUILD_TESTING)
ENDMACRO (ADD_H5_EXPORT_TEST file)
MACRO (ADD_H5_MASK_TEST resultfile resultcode)
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-D "TEST_MASK_ERROR=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5DUMP-${resultfile}")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-D "TEST_MASK_ERROR=true"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5DUMP-${resultfile}")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_MASK_TEST file)
MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
@ -473,17 +480,21 @@ IF (BUILD_TESTING)
ENDMACRO (ADD_XML_SKIP_H5_TEST)
MACRO (ADD_XML_H5_TEST resultfile resultcode)
ADD_TEST (
NAME H5DUMP-XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=--xml;${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.xml"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=--xml;${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.xml"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@ -742,15 +753,6 @@ IF (BUILD_TESTING)
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5DUMP-clearall-objects")
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-tgroup COMMAND h5dump tgroup.h5)
ADD_TEST (NAME H5DUMP-tdset COMMAND h5dump tdset.h5)
ADD_TEST (NAME H5DUMP-tattr COMMAND h5dump tattr.h5)
ADD_TEST (NAME H5DUMP-tslink COMMAND h5dump tslink.h5)
ADD_TEST (NAME H5DUMP-thlink COMMAND h5dump thlink.h5)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# test for signed/unsigned datasets
ADD_H5_TEST (packedbits 0 packedbits.h5)
# test for displaying groups

View File

@ -136,17 +136,22 @@ IF (BUILD_TESTING)
##############################################################################
MACRO (ADD_H5_TEST resultfile resultcode)
ADD_TEST (
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ls"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ls"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@ -276,13 +281,6 @@ IF (BUILD_TESTING)
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5LS-clearall-objects")
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5LS-help COMMAND h5ls -w80 -h)
ADD_TEST (NAME H5LS-tall COMMAND h5ls -w80 tall.h5)
ADD_TEST (NAME H5LS-tsoftlinks COMMAND h5ls --follow-symlinks tsoftlinks.h5)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# test the help syntax
ADD_H5_TEST (help-1 0 -w80 -h)
ADD_H5_TEST (help-2 0 -w80 --help)

View File

@ -197,18 +197,23 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}"
)
ELSE (${testtype} STREQUAL "SKIP")
ADD_TEST (
NAME H5REPACK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
-D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out.${resultfile})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
-D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out.${resultfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@ -223,50 +228,52 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}"
)
ELSE (${testtype} STREQUAL "SKIP")
IF (${resultcode} STREQUAL "0")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5REPACK_VERIFY_LAYOUT-${testname}")
ELSE (${resultcode} STREQUAL "0")
IF (${testfilter} STREQUAL "CHUNKED")
SET (nottestfilter "(CONTIGUOUS|COMPACT)")
ENDIF (${testfilter} STREQUAL "CHUNKED")
IF (${testfilter} STREQUAL "CONTIGUOUS")
SET (nottestfilter "(CHUNK|COMPACT)")
ENDIF (${testfilter} STREQUAL "CONTIGUOUS")
IF (${testfilter} STREQUAL "COMPACT")
SET (nottestfilter "(CONTIGUOUS|CHUNK)")
ENDIF (${testfilter} STREQUAL "COMPACT")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT_ALL-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-pH;testfiles/out.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${nottestfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT_ALL-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5REPACK_VERIFY_LAYOUT_ALL-${testname}")
ENDIF (${resultcode} STREQUAL "0")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
IF (${resultcode} STREQUAL "0")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5REPACK_VERIFY_LAYOUT-${testname}")
ELSE (${resultcode} STREQUAL "0")
IF (${testfilter} STREQUAL "CHUNKED")
SET (nottestfilter "(CONTIGUOUS|COMPACT)")
ENDIF (${testfilter} STREQUAL "CHUNKED")
IF (${testfilter} STREQUAL "CONTIGUOUS")
SET (nottestfilter "(CHUNK|COMPACT)")
ENDIF (${testfilter} STREQUAL "CONTIGUOUS")
IF (${testfilter} STREQUAL "COMPACT")
SET (nottestfilter "(CONTIGUOUS|CHUNK)")
ENDIF (${testfilter} STREQUAL "COMPACT")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT_ALL-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=-pH;testfiles/out.${testfile}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${testfile}-v.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${nottestfilter}"
-D "TEST_REFERENCE=${testfilter}"
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT_ALL-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5REPACK_VERIFY_LAYOUT_ALL-${testname}")
ENDIF (${resultcode} STREQUAL "0")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_VERIFY_TEST)

View File

@ -88,17 +88,22 @@ IF (BUILD_TESTING)
##############################################################################
MACRO (ADD_H5_TEST resultfile resultcode)
ADD_TEST (
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5STAT-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")

View File

@ -145,33 +145,39 @@ IF (BUILD_TESTING)
)
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})
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)
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"
)
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5MKGRP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
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"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_CMP resultfile resultcode)
##############################################################################