summaryrefslogtreecommitdiffstats
path: root/tools/test/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/misc')
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake295
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake108
-rw-r--r--tools/test/misc/CMakeTestsRepart.cmake25
3 files changed, 183 insertions, 245 deletions
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index 99650e6..a2c494d 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -94,16 +94,6 @@
macro (ADD_H5_CMP testname resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5CLEAR_CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- testfiles/${testname}.out
- testfiles/${testname}.out.err
- )
- if (last_test)
- set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
@@ -115,24 +105,12 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
- set (last_test "H5CLEAR_CMP-${testname}")
endif ()
endmacro ()
macro (ADD_H5_ERR_CMP testname resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
- NAME H5CLEAR_CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- testfiles/${testname}.out
- testfiles/${testname}.out.err
- )
- if (last_test)
- set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
@@ -145,8 +123,6 @@
-D "TEST_ERRREF=${resultfile}.err"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
- set (last_test "H5CLEAR_CMP-${testname}")
endif ()
endmacro ()
@@ -154,22 +130,16 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR_CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- testfiles/${testname}.out
- testfiles/${testname}.out.err
- testfiles/${testfile}
- )
- if (last_test)
- set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testfile}
+ )
add_test (
NAME H5CLEAR_CMP-copy_${testname}
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${testfile}" "${PROJECT_BINARY_DIR}/testfiles/${testfile}"
)
- set_tests_properties (H5CLEAR_CMP-copy_${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
+ set_tests_properties (H5CLEAR_CMP-copy_${testname} PROPERTIES
+ DEPENDS H5CLEAR_CMP-${testname}-clear-objects
+ )
add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -182,8 +152,9 @@
-D "TEST_REFERENCE=${resultfile}.ddl"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-copy_${testname})
- set (last_test "H5CLEAR_CMP-${testname}")
+ set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES
+ DEPENDS H5CLEAR_CMP-copy_${testname}
+ )
endif ()
endmacro ()
@@ -191,22 +162,16 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR_CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- testfiles/${testname}.out
- testfiles/${testname}.out.err
- testfiles/${testfile}
- )
- if (last_test)
- set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testfile}
+ )
add_test (
NAME H5CLEAR_CMP-copy_${testname}
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${testfile}" "${PROJECT_BINARY_DIR}/testfiles/${testfile}"
)
- set_tests_properties (H5CLEAR_CMP-copy_${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
+ set_tests_properties (H5CLEAR_CMP-copy_${testname} PROPERTIES
+ DEPENDS H5CLEAR_CMP-${testname}-clear-objects
+ )
add_test (
NAME H5CLEAR_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -220,8 +185,9 @@
-D "TEST_ERRREF=${resultfile}.err"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-copy_${testname})
- set (last_test "H5CLEAR_CMP-${testname}")
+ set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES
+ DEPENDS H5CLEAR_CMP-copy_${testname}
+ )
endif ()
endmacro ()
@@ -231,12 +197,10 @@
NAME H5CLEAR_RET-${testname}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> ${ARGN}
)
- set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WILL_FAIL "${resultcode}")
- if (last_test)
- set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5CLEAR_RET-${testname}")
+ set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ WILL_FAIL "${resultcode}"
+ )
endif ()
endmacro ()
@@ -244,24 +208,16 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR_FILESIZE_TEST-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- testfiles/${testname}_before_size.out
- testfiles/${testname}_before_size.out.err
- testfiles/${testname}_after_size.out
- testfiles/${testname}_after_size.out.err
- testfiles/${testname}.h5
- )
- if (last_test)
- set_tests_properties (H5CLEAR_FILESIZE_TEST-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}.h5
+ )
add_test (
NAME H5CLEAR_FILESIZE_TEST-copy_${testname}
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${testname}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testname}.h5"
)
- set_tests_properties (H5CLEAR_FILESIZE_TEST-copy_${testname} PROPERTIES DEPENDS H5CLEAR_FILESIZE_TEST-${testname}-clear-objects)
+ set_tests_properties (H5CLEAR_FILESIZE_TEST-copy_${testname} PROPERTIES
+ DEPENDS H5CLEAR_FILESIZE_TEST-${testname}-clear-objects
+ )
add_test (
NAME H5CLEAR_FILESIZE_CMP-${testname}_before_size
COMMAND "${CMAKE_COMMAND}"
@@ -274,7 +230,9 @@
-D "TEST_REFERENCE=${resultfile}_before_size.ddl"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5CLEAR_FILESIZE_CMP-${testname}_before_size PROPERTIES DEPENDS H5CLEAR_FILESIZE_TEST-copy_${testname})
+ set_tests_properties (H5CLEAR_FILESIZE_CMP-${testname}_before_size PROPERTIES
+ DEPENDS H5CLEAR_FILESIZE_TEST-copy_${testname}
+ )
if (NOT ${incr_size} MATCHES "NONE")
add_test (
NAME H5CLEAR_FILESIZE_INCR-${testname}
@@ -286,9 +244,11 @@
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> --increment ${testname}.h5
)
endif ()
- set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES WILL_FAIL "${resultcode}")
- set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES DEPENDS H5CLEAR_FILESIZE_CMP-${testname}_before_size)
+ set_tests_properties (H5CLEAR_FILESIZE_INCR-${testname} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ WILL_FAIL "${resultcode}"
+ DEPENDS H5CLEAR_FILESIZE_CMP-${testname}_before_size
+ )
add_test (
NAME H5CLEAR_FILESIZE_CMP-${testname}_after_size
COMMAND "${CMAKE_COMMAND}"
@@ -297,12 +257,75 @@
-D "TEST_ARGS:STRING=--filesize;${testname}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${testname}_after_size.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=${resultfile}_after_size.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5CLEAR_FILESIZE_CMP-${testname}_after_size PROPERTIES
+ DEPENDS H5CLEAR_FILESIZE_INCR-${testname}
+ )
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_FILESIZE_FAIL_TEST testname resultcode resultfile incr_size)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR_FILESIZE_FAIL_TEST-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}.h5
+ )
+ add_test (
+ NAME H5CLEAR_FILESIZE_FAIL_TEST-copy_${testname}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/${testname}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testname}.h5"
+ )
+ set_tests_properties (H5CLEAR_FILESIZE_FAIL_TEST-copy_${testname} PROPERTIES
+ DEPENDS H5CLEAR_FILESIZE_FAIL_TEST-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5CLEAR_FILESIZE_FAIL_CMP-${testname}_before_size
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_ARGS:STRING=--filesize;${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}_before_size.out"
-D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.mty"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5CLEAR_FILESIZE_FAIL_CMP-${testname}_before_size PROPERTIES
+ DEPENDS H5CLEAR_FILESIZE_FAIL_TEST-copy_${testname}
+ )
+ if (NOT ${incr_size} MATCHES "NONE")
+ add_test (
+ NAME H5CLEAR_FILESIZE_FAIL_INCR-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s --increment=${incr_size} ${testname}.h5
+ )
+ else ()
+ add_test (
+ NAME H5CLEAR_FILESIZE_FAIL_INCR-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s --increment ${testname}.h5
+ )
+ endif ()
+ set_tests_properties (H5CLEAR_FILESIZE_FAIL_INCR-${testname} PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5CLEAR_FILESIZE_FAIL_CMP-${testname}_before_size
+ )
+ add_test (
+ NAME H5CLEAR_FILESIZE_FAIL_CMP-${testname}_after_size
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear${tgt_ext}>"
+ -D "TEST_ARGS:STRING=--filesize;${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}_after_size.out"
+ -D "TEST_EXPECT=0"
-D "TEST_REFERENCE=${resultfile}_after_size.ddl"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5CLEAR_FILESIZE_CMP-${testname}_after_size PROPERTIES DEPENDS H5CLEAR_FILESIZE_INCR-${testname})
- set (last_test "H5CLEAR_FILESIZE_CMP-${testname}_after_size")
+ set_tests_properties (H5CLEAR_FILESIZE_FAIL_CMP-${testname}_after_size PROPERTIES
+ DEPENDS H5CLEAR_FILESIZE_FAIL_INCR-${testname}
+ )
endif ()
endmacro ()
@@ -310,32 +333,39 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5CLEAR-clr_open_chk-copy_${testname}.h5
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${testfile}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testfile}.h5"
)
- if (last_test)
- set_tests_properties (H5CLEAR-clr_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5CLEAR-clr_open_chk-copy_${testname}.h5")
# Initial file open fails OR
# File open succeeds because the library does not check status_flags for file with < v3 superblock
- add_test (NAME H5CLEAR-clr_open_chk-${testname}_${resultcode} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
- set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WILL_FAIL "${resultcode}")
- set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (last_test)
- set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES DEPENDS ${last_test})
- endif ()
+ add_test (
+ NAME H5CLEAR-clr_open_chk-${testname}_${resultcode}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:clear_open_chk> ${testfile}.h5
+ )
+ set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES
+ WILL_FAIL "${resultcode}"
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ DEPENDS H5CLEAR-clr_open_chk-copy_${testname}.h5
+ )
# After "h5clear" the file, the subsequent file open succeeds
- add_test (NAME H5CLEAR-h5clr-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s ${testfile}.h5)
- set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES DEPENDS H5CLEAR-clr_open_chk-${testname}_${resultcode})
- set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- add_test (NAME H5CLEAR-clr_open_chk-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
- set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES DEPENDS H5CLEAR-h5clr-${testname})
- set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- set (last_test "H5CLEAR-clr_open_chk-${testname}")
+ add_test (
+ NAME H5CLEAR-h5clr-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear${tgt_ext}> -s ${testfile}.h5
+ )
+ set_tests_properties (H5CLEAR-h5clr-${testname} PROPERTIES
+ DEPENDS H5CLEAR-clr_open_chk-${testname}_${resultcode}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
+ add_test (
+ NAME H5CLEAR-clr_open_chk-${testname}
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:clear_open_chk> ${testfile}.h5
+ )
+ set_tests_properties (H5CLEAR-clr_open_chk-${testname} PROPERTIES
+ DEPENDS H5CLEAR-h5clr-${testname}
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
endif ()
endmacro ()
@@ -347,73 +377,6 @@
#
#
#
-# The following are tests to verify the status_flags field is cleared properly:
-if (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- add_test (
- NAME H5CLEAR-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5clear_log_v3.h5
- h5clear_mdc_image.h5
- h5clear_sec2_v0.h5
- h5clear_sec2_v2.h5
- h5clear_sec2_v3.h5
- orig_h5clear_sec2_v0.h5
- orig_h5clear_sec2_v2.h5
- orig_h5clear_sec2_v3.h5
- latest_h5clear_log_v3.h5
- latest_h5clear_sec2_v3.h5
- mod_h5clear_mdc_image.h5
- mod_h5clear_mdc_image2.h5
- ${HDF5_TEST_FILES}
- )
- if (last_test)
- set_tests_properties (H5CLEAR-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5CLEAR-clearall-objects")
-
- foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES})
- add_test (
- NAME H5CLEAR-copy_${h5_file}
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
- "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}"
- )
- if (last_test)
- set_tests_properties (H5CLEAR-copy_${h5_file} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5CLEAR-copy_${h5_file}")
- endforeach ()
- # make second copy of h5clear_sec2.h5
- foreach (h5_file ${HDF5_SEC2_TEST_FILES})
- add_test (
- NAME H5CLEAR-copy_orig_${h5_file}
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
- "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}"
- )
- if (last_test)
- set_tests_properties (H5CLEAR-copy_orig_${h5_file} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5CLEAR-copy_orig_${h5_file}")
- endforeach ()
- # make second copy of mod_h5clear_mdc_image.h5
- add_test (
- NAME H5CLEAR-copy_mod_h5clr_mdc_image2.h5
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different
- "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5"
- )
- if (last_test)
- set_tests_properties (H5CLEAR-copy_mod_h5clr_mdc_image2.h5 PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5CLEAR-copy_mod_h5clr_mdc_image2.h5")
-endif()
-
-#
-#
-#
# The following are tests to verify the expected output from h5clear
# "h5clear -h"
# "h5clear" (no options, no file)
@@ -487,9 +450,7 @@ endif()
# "h5clear -s --increment=0 h5clear_status_noclose.h5" (clear status_flag, EOA = MAX(EOA, EOF) + 0)
# (no output, check exit code)
# "h5clear --filesize h5clear_status_noclose.h5" (print EOA/EOF after the last action)
- ADD_H5_ERR_CMP_WITH_COPY (h5clr_open_fail_nc_s 1 h5clear_open_fail h5clear_status_noclose.h5 "--filesize")
- ADD_H5_RETTEST (h5clr_mdc_image_nc "false" "-s" "--increment=0" h5clear_status_noclose.h5)
- ADD_H5_CMP (h5clr_no_mdc_image_nc_m h5clear_status_noclose_after_size 0 "--filesize" h5clear_status_noclose.h5)
+ ADD_H5_FILESIZE_FAIL_TEST (h5clear_status_noclose 1 h5clear_status_noclose 0)
#
# (2) h5clear_fsm_persist_noclose.h5
# "h5clear --filesize h5clear_fsm_persist_noclose.h5" (print EOA/EOF before the next action)
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index 37d87ca..11fa3f2 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -61,29 +61,22 @@
endif ()
macro (ADD_H5_TEST resultfile resultcode resultoption)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- add_test (
- NAME H5MKGRP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
- )
- set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- endif ()
-
+ add_test (
+ NAME H5MKGRP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
add_test (
NAME H5MKGRP-${resultfile}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
)
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (HDF5_ENABLE_USING_MEMCHECKER)
- if (last_test)
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif ()
- else ()
- set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES
+ DEPENDS H5MKGRP-${resultfile}-clear-objects
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
+ )
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
@@ -107,13 +100,11 @@
else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
+ COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
- set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
add_test (
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -126,7 +117,9 @@
-D "TEST_REFERENCE=${resultfile}.txt"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
+ set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES
+ DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects
+ )
endif ()
endmacro ()
@@ -138,54 +131,23 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5MKGRP-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5mkgrp_help.out
- h5mkgrp_help.out.err
- h5mkgrp_version.out
- h5mkgrp_version.out.err
- h5mkgrp_single.h5
- h5mkgrp_single.out
- h5mkgrp_single.out.err
- h5mkgrp_single_v.h5
- h5mkgrp_single_v.out
- h5mkgrp_single_v.out.err
- h5mkgrp_single_p.h5
- h5mkgrp_single_p.out
- h5mkgrp_single_p.out.err
- h5mkgrp_single_l.h5
- h5mkgrp_single_l.out
- h5mkgrp_single_l.out.err
- h5mkgrp_several.h5
- h5mkgrp_several.out
- h5mkgrp_several.out.err
- h5mkgrp_several_v.h5
- h5mkgrp_several_v.out
- h5mkgrp_several_v.out.err
- h5mkgrp_several_p.h5
- h5mkgrp_several_p.out
- h5mkgrp_several_p.out.err
- h5mkgrp_several_l.h5
- h5mkgrp_several_l.out
- h5mkgrp_several_l.out.err
- h5mkgrp_nested_p.h5
- h5mkgrp_nested_p.out
- h5mkgrp_nested_p.out.err
- h5mkgrp_nested_lp.h5
- h5mkgrp_nested_lp.out
- h5mkgrp_nested_lp.out.err
- h5mkgrp_nested_mult_p.h5
- h5mkgrp_nested_mult_p.out
- h5mkgrp_nested_mult_p.out.err
- h5mkgrp_nested_mult_lp.h5
- h5mkgrp_nested_mult_lp.out
- h5mkgrp_nested_mult_lp.out.err
+ COMMAND ${CMAKE_COMMAND} -E remove
+ h5mkgrp_single.h5
+ h5mkgrp_single_v.h5
+ h5mkgrp_single_p.h5
+ h5mkgrp_single_l.h5
+ h5mkgrp_several.h5
+ h5mkgrp_several_v.h5
+ h5mkgrp_several_p.h5
+ h5mkgrp_several_l.h5
+ h5mkgrp_nested_p.h5
+ h5mkgrp_nested_lp.h5
+ h5mkgrp_nested_mult_p.h5
+ h5mkgrp_nested_mult_lp.h5
+ )
+ set_tests_properties (H5MKGRP-clearall-objects PROPERTIES
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
- set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (last_test)
- set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5MKGRP-clearall-objects")
endif ()
# Check that help & version is displayed properly
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
index 24b6004..fa49c53 100644
--- a/tools/test/misc/CMakeTestsRepart.cmake
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -80,31 +80,46 @@
set_tests_properties (H5REPART-clearall-objects PROPERTIES FIXTURES_SETUP clear_testrepart)
# repartition family member size to 20,000 bytes.
- add_test (NAME H5REPART-h5repart_20K COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+ add_test (
+ NAME H5REPART-h5repart_20K
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 family_file%05d.h5 fst_family%05d.h5
+ )
set_tests_properties (H5REPART-h5repart_20K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# repartition family member size to 5 KB.
- add_test (NAME H5REPART-h5repart_5K COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5)
+ add_test (
+ NAME H5REPART-h5repart_5K
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 5k family_file%05d.h5 scd_family%05d.h5
+ )
set_tests_properties (H5REPART-h5repart_5K PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# convert family file to sec2 file of 20,000 bytes
- add_test (NAME H5REPART-h5repart_single COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5)
+ add_test (
+ NAME H5REPART-h5repart_single
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_single family_file%05d.h5 family_to_single.h5
+ )
set_tests_properties (H5REPART-h5repart_single PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# convert family file to sec2 file of 20,000 bytes (old argument)
- add_test (NAME H5REPART-h5repart_sec2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
+ add_test (
+ NAME H5REPART-h5repart_sec2
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart${tgt_ext}> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5
+ )
set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES
FIXTURES_REQUIRED clear_testrepart
)
# test the output files repartitioned above.
- add_test (NAME H5REPART-h5repart_test COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_test>)
+ add_test (
+ NAME H5REPART-h5repart_test
+ COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_test>
+ )
set_tests_properties (H5REPART-h5repart_test PROPERTIES
DEPENDS "H5REPART-h5repart_20K;H5REPART-h5repart_5K;H5REPART-h5repart_single;H5REPART-h5repart_sec2"
)