summaryrefslogtreecommitdiffstats
path: root/tools/test/misc
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-20 13:35:17 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-20 13:35:17 (GMT)
commit2fa9d84b12e769331fc7bd6efdde46347dd676c6 (patch)
treec4d17414126e670dfa425bb89d1750177104020d /tools/test/misc
parent8a391887be263e0ba7f1ba659dcf6559b5a5e01a (diff)
parent18ba8cb7d247cc2f535e53d66c2a47740724de6a (diff)
downloadhdf5-2fa9d84b12e769331fc7bd6efdde46347dd676c6.zip
hdf5-2fa9d84b12e769331fc7bd6efdde46347dd676c6.tar.gz
hdf5-2fa9d84b12e769331fc7bd6efdde46347dd676c6.tar.bz2
Merge pull request #713 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '18ba8cb7d247cc2f535e53d66c2a47740724de6a': Windows cannot share files easily Avoid double free Windows had issues - revert code changes for get_option Remove extra command line Correct name of file Add Mask test to script Add new output files to clear test Correct name of err file Fix name of output files Fix format convert error mask test Fix tools error handling and valgrind issues Fix error handling issues Correct test results Cleanup valgrind issues HDFFV-1097 Changed file columns HDFFV-10297 add h5copy test and fix h5diff errors Fix VS2012 declaration error HDFFV-10297 Fix compiler compaliants HDFFV-10296 Update tools lib to use the error handling macros. Close ids in loop
Diffstat (limited to 'tools/test/misc')
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake38
1 files changed, 34 insertions, 4 deletions
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index b9095fb..fb4826b 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -55,6 +55,36 @@
##############################################################################
##############################################################################
+ # Need special dependencies for tests that use the same reference file
+ # This is an issue on Windows
+ macro (ADD_H5_USAGE testname resultfile resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR_USAGE-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/${testname}.out
+ testfiles/${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR_USAGE-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ add_test (
+ NAME H5CLEAR_USAGE-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5CLEAR_USAGE-${testname} PROPERTIES DEPENDS H5CLEAR_USAGE-${testname}-clear-objects)
+ set (last_test "H5CLEAR_USAGE-${testname}")
+ endif ()
+ endmacro ()
+
macro (ADD_H5_CMP testname resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -212,10 +242,10 @@ endif()
# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file)
# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image)
# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image)
- ADD_H5_CMP (h5clr_usage_h h5clear_usage 0 "-h")
- ADD_H5_CMP (h5clr_usage h5clear_usage 1 "")
- ADD_H5_CMP (h5clr_usage_junk h5clear_usage 1 "" junk.h5)
- ADD_H5_CMP (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5)
+ ADD_H5_USAGE (h5clr_usage_h h5clear_usage 0 "-h")
+ ADD_H5_USAGE (h5clr_usage h5clear_usage 1 "")
+ ADD_H5_USAGE (h5clr_usage_junk h5clear_usage 1 "" junk.h5)
+ ADD_H5_USAGE (h5clr_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5)
ADD_H5_CMP (h5clr_missing_file_m h5clear_missing_file 1 "-m")
ADD_H5_CMP (h5clr_open_fail_s h5clear_open_fail 1 "-s" junk.h5)
ADD_H5_CMP (h5clr_missing_file_ms h5clear_missing_file 1 "-m" "-s")