diff options
Diffstat (limited to 'tools/test/h5dump/CMakeTests.cmake')
-rw-r--r-- | tools/test/h5dump/CMakeTests.cmake | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index d7f39e1..586957e 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -511,6 +511,40 @@ endif () endmacro () + macro (ADD_H5_COMP_TEST resultfile resultcode resultvalue) + # If using memchecker add tests without using scripts + if (HDF5_USING_ANALYSIS_TOOL) + add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump> ${ARGN}) + if (${resultcode}) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + endif () + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + else () + add_test ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_FILTER:STRING=SIZE [0-9]* \\(${resultvalue}\\\.[0-9][0-9][0-9]:1 COMPRESSION\\)" + -D "TEST_FILTER_REPLACE:STRING=SIZE XXXX (${resultvalue}.XXX:1 COMPRESSION)" + -P "${HDF_RESOURCES_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + if ("H5DUMP-${resultfile}" MATCHES "${HDF5_DISABLE_TESTS_REGEX}") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DISABLED true) + endif () + endmacro () + macro (ADD_H5_TEST_N resultfile resultcode) add_test ( NAME H5DUMP-N-${resultfile}-clear-objects @@ -1235,25 +1269,25 @@ # tests for filters # SZIP - ADD_H5_TEST (tszip 0 --enable-error-stack -H -p -d szip tfilters.h5) + ADD_H5_COMP_TEST (tszip 0 2 --enable-error-stack -H -p -d szip tfilters.h5) # deflate - ADD_H5_TEST (tdeflate 0 --enable-error-stack -H -p -d deflate tfilters.h5) + ADD_H5_COMP_TEST (tdeflate 0 2 --enable-error-stack -H -p -d deflate tfilters.h5) # shuffle ADD_H5_TEST (tshuffle 0 --enable-error-stack -H -p -d shuffle tfilters.h5) # fletcher32 - ADD_H5_TEST (tfletcher32 0 --enable-error-stack -H -p -d fletcher32 tfilters.h5) + ADD_H5_COMP_TEST (tfletcher32 0 0 --enable-error-stack -H -p -d fletcher32 tfilters.h5) # nbit - ADD_H5_TEST (tnbit 0 --enable-error-stack -H -p -d nbit tfilters.h5) + ADD_H5_COMP_TEST (tnbit 0 10 --enable-error-stack -H -p -d nbit tfilters.h5) # scaleoffset - ADD_H5_TEST (tscaleoffset 0 --enable-error-stack -H -p -d scaleoffset tfilters.h5) + ADD_H5_COMP_TEST (tscaleoffset 0 4 --enable-error-stack -H -p -d scaleoffset tfilters.h5) # all - ADD_H5_TEST (tallfilters 0 --enable-error-stack -H -p -d all tfilters.h5) + ADD_H5_COMP_TEST (tallfilters 0 1 --enable-error-stack -H -p -d all tfilters.h5) # user defined ADD_H5_TEST (tuserfilter 0 --enable-error-stack -H -p -d myfilter tfilters.h5) |