diff options
-rw-r--r-- | config/cmake/CTestCustom.cmake | 27 | ||||
-rw-r--r-- | config/sanitizer/sanitizers.cmake | 2 | ||||
-rw-r--r-- | tools/test/h5repack/CMakeTests.cmake | 176 | ||||
-rw-r--r-- | tools/test/misc/CMakeTestsMkgrp.cmake | 37 |
4 files changed, 115 insertions, 127 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index 7ee5737..1b8d7d7 100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -21,14 +21,17 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION # "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:" # "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument" # "H5detect.c[0-9 \t:]*warning:[ \t]*passing argument" -# "note.*expected.*void.*but argument is of type.*volatile" + "note.*expected.*void.*but argument is of type.*volatile" # "H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type" # "H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244" -# "SZIP.src.*:[ \t]*warning" + "src.ZLIB.*:[ \t]*warning" + "src.SZIP.*:[ \t]*warning" # "POSIX name for this item is deprecated" "disabling jobserver mode" "config.cmake.xlatefile.c" # "warning.*implicit declaration of function" + "warning.*unknown pragma" + "warning.*unrecognized .pragma" # "note: expanded from macro" # "fpp:[ \t]*warning:[ \t]*cannot remove H5_DEBUG_API - not a predefined macro" ) @@ -69,26 +72,6 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE HL_FORTRAN_f90_ex-clear-objects ######### tools/h5clear ######### H5CLEAR-clearall-objects - H5CLEAR-copy_h5clear_fsm_persist_equal.h5 - H5CLEAR-copy_h5clear_fsm_persist_greater.h5 - H5CLEAR-copy_h5clear_fsm_persist_less.h5 - H5CLEAR-copy_h5clear_fsm_persist_noclose.h5 - H5CLEAR-copy_h5clear_fsm_persist_user_equal.h5 - H5CLEAR-copy_h5clear_fsm_persist_user_greater.h5 - H5CLEAR-copy_h5clear_fsm_persist_user_less.h5 - H5CLEAR-copy_h5clear_log_v3.h5 - H5CLEAR-copy_h5clear_mdc_image.h5 - H5CLEAR-copy_h5clear_sec2_v0.h5 - H5CLEAR-copy_h5clear_sec2_v2.h5 - H5CLEAR-copy_h5clear_sec2_v3.h5 - H5CLEAR-copy_h5clear_status_noclear.h5 - H5CLEAR-copy_latest_h5clear_log_v3.h5 - H5CLEAR-copy_latest_h5clear_sec2_v3.h5 - H5CLEAR-copy_mod_h5clear_mdc_image.h5 - H5CLEAR-copy_mod_h5clr_mdc_image2.h5 - H5CLEAR-copy_orig_h5clear_sec2_v0.h5 - H5CLEAR-copy_orig_h5clear_sec2_v2.h5 - H5CLEAR-copy_orig_h5clear_sec2_v3.h5 H5CLEAR-h5clear_gentest # does not close ids by design ######### tools/h5copy ######### H5COPY-clearall-objects diff --git a/config/sanitizer/sanitizers.cmake b/config/sanitizer/sanitizers.cmake index 7a6c195..2625ec3 100644 --- a/config/sanitizer/sanitizers.cmake +++ b/config/sanitizer/sanitizers.cmake @@ -28,7 +28,7 @@ function(append value) endforeach(variable) endfunction() -if(USE_SANITIZER) +if(USE_SANITIZER AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") set(CMAKE_EXPORT_COMPILE_COMMANDS ON) append("-fno-omit-frame-pointer" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 0c761e2..aa99d04 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -725,100 +725,100 @@ endmacro () macro (ADD_H5_EXTERNAL_TEST testname testtype testfile) - # canonical file = h5repack_${testfile}.h5 - preexist - # external file = h5repack_${testfile}_ex.h5 - preexist - # repacked file = h5repack_${testfile}_rp.h5 - created - # external data file = h5repack_${testfile}_ex-0.dat - if ("${testtype}" STREQUAL "SKIP") - if (NOT HDF5_ENABLE_USING_MEMCHECKER) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + # canonical file = h5repack_${testfile}.h5 - preexist + # external file = h5repack_${testfile}_ex.h5 - preexist + # repacked file = h5repack_${testfile}_rp.h5 - created + # external data file = h5repack_${testfile}_ex-0.dat + if ("${testtype}" STREQUAL "SKIP") add_test ( NAME H5REPACK_EXTERNAL-${testname} COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" ) set_property(TEST H5REPACK_EXTERNAL-${testname} PROPERTY DISABLED) + else () + add_test ( + NAME H5REPACK_EXTERNAL-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_rp.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + FIXTURES_REQUIRED clear_h5repack + ) + # make sure external data file 0 is available + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_CPY + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${PROJECT_SOURCE_DIR}/testfiles/h5repack_${testfile}_ex-0.dat" "${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex-0.dat" + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_CPY PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}-clear-objects + ) + # comparison of known files + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_DFF1 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF1 PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_CPY + ) + # repack the external file to the repacked file + add_test ( + NAME H5REPACK_EXTERNAL-${testname} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_DFF1 + ) + # comparison of repacked file to known files + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_DFF2 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF2 PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname} + ) + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_DFF3 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF3 PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_DFF2 + ) + # invalidate external file by removing its first data file + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_DATA_RMV + COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_ex-0.dat + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_DATA_RMV PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_DFF3 + ) + # verify comparison of repacked file to known file + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_DFF4 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF4 PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_DATA_RMV + ) + # verify comparison of repacked file to known external file fails + add_test ( + NAME H5REPACK_EXTERNAL-${testname}_DFF_FAIL + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF_FAIL PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_DFF4 + WILL_FAIL "true" + ) endif () - else () - add_test ( - NAME H5REPACK_EXTERNAL-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_rp.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}-clear-objects PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - FIXTURES_REQUIRED clear_h5repack - ) - # make sure external data file 0 is available - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_CPY - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${PROJECT_SOURCE_DIR}/testfiles/h5repack_${testfile}_ex-0.dat" "${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex-0.dat" - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_CPY PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}-clear-objects - ) - # comparison of known files - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_DFF1 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF1 PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}_CPY - ) - # repack the external file to the repacked file - add_test ( - NAME H5REPACK_EXTERNAL-${testname} - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname} PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}_DFF1 - ) - # comparison of repacked file to known files - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_DFF2 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF2 PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname} - ) - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_DFF3 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF3 PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}_DFF2 - ) - # invalidate external file by removing its first data file - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_DATA_RMV - COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_ex-0.dat - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_DATA_RMV PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}_DFF3 - ) - # verify comparison of repacked file to known file - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_DFF4 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF4 PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}_DATA_RMV - ) - # verify comparison of repacked file to known external file fails - add_test ( - NAME H5REPACK_EXTERNAL-${testname}_DFF_FAIL - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_rp.h5 ${PROJECT_BINARY_DIR}/testfiles/h5repack_${testfile}_ex.h5 - ) - set_tests_properties (H5REPACK_EXTERNAL-${testname}_DFF_FAIL PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - DEPENDS H5REPACK_EXTERNAL-${testname}_DFF4 - WILL_FAIL "true" - ) endif () endmacro () diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake index c947e0e..75cafb7 100644 --- a/tools/test/misc/CMakeTestsMkgrp.cmake +++ b/tools/test/misc/CMakeTestsMkgrp.cmake @@ -61,22 +61,27 @@ endif () macro (ADD_H5_TEST resultfile resultcode resultoption) - 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 - DEPENDS H5MKGRP-${resultfile}-clear-objects - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - ) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5MKGRP-${resultfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN} + ) + else () + 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 + DEPENDS H5MKGRP-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) add_test ( NAME H5MKGRP-${resultfile}-h5ls COMMAND "${CMAKE_COMMAND}" |