diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2014-06-17 20:40:01 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2014-06-17 20:40:01 (GMT) |
commit | 611d2c89afa02204e6321849d24aed26878097f0 (patch) | |
tree | 806802afc30a3a212d94b47ad661fd3b8c91a0df /tools/h5dump/CMakeTestsXML.cmake | |
parent | 720e0c7623be9847867b9d857329ab626ee8f3e8 (diff) | |
download | hdf5-611d2c89afa02204e6321849d24aed26878097f0.zip hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.gz hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.bz2 |
[svn-r25307] Bring revisions #24698 - #24783 from trunk to revise_chunks.
Tested on jam, koala, ostrich, platypus.
Diffstat (limited to 'tools/h5dump/CMakeTestsXML.cmake')
-rw-r--r-- | tools/h5dump/CMakeTestsXML.cmake | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake index 6c9cae1..ffc1cae 100644 --- a/tools/h5dump/CMakeTestsXML.cmake +++ b/tools/h5dump/CMakeTestsXML.cmake @@ -8,7 +8,7 @@ # # copy XML test files from source dir to test dir # - SET (HDF5_XML_REFERENCE_TEST_FILES + set (HDF5_XML_REFERENCE_TEST_FILES ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5 @@ -61,7 +61,7 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5 ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5 ) - SET (HDF5_XML_REFERENCE_FILES + set (HDF5_XML_REFERENCE_FILES ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml @@ -127,29 +127,29 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml ) - FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) + foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") - #MESSAGE (STATUS " Copying ${tst_xml_h5_file}") - ADD_CUSTOM_COMMAND ( + set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") + #message (STATUS " Copying ${tst_xml_h5_file}") + add_custom_command ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${tst_xml_h5_file} ${dest} ) - ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) + endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) - FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME) - SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") - #MESSAGE (STATUS " Copying ${tst_xml_other_file}") - ADD_CUSTOM_COMMAND ( + set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") + #message (STATUS " Copying ${tst_xml_other_file}") + add_custom_command ( TARGET h5dump POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${tst_xml_other_file} ${dest} ) - ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + endforeach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) ############################################################################## ############################################################################## @@ -158,36 +158,36 @@ ############################################################################## MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) - IF (${testtype} STREQUAL "SKIP") - IF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( + if (${testtype} STREQUAL "SKIP") + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( NAME H5DUMP-XML-${skipresultfile}-SKIPPED COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}" ) - ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ELSE (${testtype} STREQUAL "SKIP") + endif (NOT HDF5_ENABLE_USING_MEMCHECKER) + else (${testtype} STREQUAL "SKIP") ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN}) - ENDIF (${testtype} STREQUAL "SKIP") + endif (${testtype} STREQUAL "SKIP") ENDMACRO (ADD_XML_SKIP_H5_TEST) MACRO (ADD_XML_H5_TEST resultfile resultcode) - IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN}) - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - IF (NOT ${resultcode} STREQUAL "0") - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") - ENDIF (NOT ${resultcode} STREQUAL "0") - IF (NOT "${last_xml_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) - ENDIF (NOT "${last_xml_test}" STREQUAL "") - ELSE (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST ( + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN}) + set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + if (NOT ${resultcode} STREQUAL "0") + set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") + endif (NOT ${resultcode} STREQUAL "0") + if (NOT "${last_xml_test}" STREQUAL "") + set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) + endif (NOT "${last_xml_test}" STREQUAL "") + else (HDF5_ENABLE_USING_MEMCHECKER) + add_test ( NAME H5DUMP-XML-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.out ${resultfile}.out.err ) - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - ADD_TEST ( + set_tests_properties (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + add_test ( NAME H5DUMP-XML-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" @@ -198,8 +198,8 @@ -D "TEST_REFERENCE=${resultfile}.xml" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) - SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_XML_H5_TEST file) ############################################################################## @@ -208,9 +208,9 @@ ############################################################################## ############################################################################## - IF (HDF5_ENABLE_USING_MEMCHECKER) + if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run - ADD_TEST ( + add_test ( NAME H5DUMP-XML-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -343,12 +343,12 @@ tvlstr.h5.out tvlstr.h5.out.err ) - SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") - IF (NOT "${last_xml_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test}) - ENDIF (NOT "${last_xml_test}" STREQUAL "") - SET (last_test "H5DUMP-XML-clearall-objects") - ENDIF (HDF5_ENABLE_USING_MEMCHECKER) + set_tests_properties (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") + if (NOT "${last_xml_test}" STREQUAL "") + set_tests_properties (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test}) + endif (NOT "${last_xml_test}" STREQUAL "") + set (last_test "H5DUMP-XML-clearall-objects") + endif (HDF5_ENABLE_USING_MEMCHECKER) ########## test XML ADD_XML_H5_TEST (tall.h5 0 tall.h5) @@ -413,10 +413,10 @@ # The lone colon here confuses some systems (Cray X1). Skip # it if configure detects that this is a problem. - SET (TESTTYPE "TEST") - IF (NOT "H5_LONE_COLON") - SET (TESTTYPE "SKIP") - ENDIF (NOT "H5_LONE_COLON") + set (TESTTYPE "TEST") + if (NOT "H5_LONE_COLON") + set (TESTTYPE "SKIP") + endif (NOT "H5_LONE_COLON") ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5) ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5) |