diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-10-17 16:48:26 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2017-10-17 16:50:46 (GMT) |
commit | a7ba8af0d145fee16a758ae4150316c7f2a38263 (patch) | |
tree | 1e904f5bb6ae6413e481f3d4899329e2de91eb58 /tools/test/h5dump/CMakeTestsXML.cmake | |
parent | fe70476a225d2e0576149e0f1bdf95689f922c77 (diff) | |
parent | 0c207cd2f84021526690bcbc4e0a8a49ea4cb8a4 (diff) | |
download | hdf5-a7ba8af0d145fee16a758ae4150316c7f2a38263.zip hdf5-a7ba8af0d145fee16a758ae4150316c7f2a38263.tar.gz hdf5-a7ba8af0d145fee16a758ae4150316c7f2a38263.tar.bz2 |
Merge branch 'develop' into bugfix/version_bounds
Diffstat (limited to 'tools/test/h5dump/CMakeTestsXML.cmake')
-rw-r--r-- | tools/test/h5dump/CMakeTestsXML.cmake | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index e068c5e..9c68e5f 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -161,10 +161,10 @@ ############################################################################## macro (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype) - if (${testtype} STREQUAL "SKIP") + if ("${testtype}" STREQUAL "SKIP") if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5DUMP-XML-${skipresultfile}-SKIPPED + NAME H5DUMP_XML-${skipresultfile}-SKIPPED COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}" ) endif () @@ -175,17 +175,26 @@ 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") + 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 () if (NOT "${last_xml_test}" STREQUAL "") - set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) endif () else () + # Remove any output file left over from previous test run add_test ( - NAME H5DUMP-XML-${resultfile} + 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 ( + NAME H5DUMP_XML-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" -D "TEST_ARGS:STRING=--xml;${ARGN}" @@ -195,6 +204,7 @@ -D "TEST_REFERENCE=${resultfile}.xml" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS H5DUMP_XML-${resultfile}-clear-objects) endif () endmacro () |