mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
Fix STREQUAL if commands.
This commit is contained in:
parent
19ee2f9dc8
commit
4f9e47650a
@ -122,7 +122,7 @@ if (TEST_MASK_ERROR)
|
||||
endif ()
|
||||
|
||||
# if the return value is !=0 bail out
|
||||
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
|
||||
message (STATUS "ERROR OUTPUT: ${TEST_STREAM}")
|
||||
message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != 0.\n${TEST_ERROR}")
|
||||
endif ()
|
||||
@ -141,13 +141,13 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
)
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
set (TEST_RESULT 0)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
|
||||
list (LENGTH test_act len_act)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
|
||||
list (LENGTH test_ref len_ref)
|
||||
if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
|
||||
if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
|
||||
math (EXPR _FP_LEN "${len_ref} - 1")
|
||||
foreach (line RANGE 0 ${_FP_LEN})
|
||||
list (GET test_act ${line} str_act)
|
||||
@ -160,14 +160,14 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
else ()
|
||||
if (${len_act} STREQUAL "0")
|
||||
if ("${len_act}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
|
||||
endif ()
|
||||
if (${len_ref} STREQUAL "0")
|
||||
if ("${len_ref}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT ${len_act} STREQUAL ${len_ref})
|
||||
if (NOT "${len_act}" STREQUAL "${len_ref}")
|
||||
set (TEST_RESULT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
@ -175,7 +175,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
message (STATUS "COMPARE Result: ${TEST_RESULT}")
|
||||
|
||||
# again, if return value is !=0 scream and shout
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
|
||||
endif ()
|
||||
|
||||
@ -191,14 +191,14 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
)
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
set (TEST_RESULT 0)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
|
||||
list (LENGTH test_act len_act)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
|
||||
list (LENGTH test_ref len_ref)
|
||||
math (EXPR _FP_LEN "${len_ref} - 1")
|
||||
if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
|
||||
if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
|
||||
math (EXPR _FP_LEN "${len_ref} - 1")
|
||||
foreach (line RANGE 0 ${_FP_LEN})
|
||||
list (GET test_act ${line} str_act)
|
||||
@ -211,14 +211,14 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
else ()
|
||||
if (${len_act} STREQUAL "0")
|
||||
if ("${len_act}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
|
||||
endif ()
|
||||
if (${len_ref} STREQUAL "0")
|
||||
if ("${len_ref}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
|
||||
endif ()
|
||||
endif()
|
||||
if (NOT ${len_act} STREQUAL ${len_ref})
|
||||
if (NOT "${len_act}" STREQUAL "${len_ref}")
|
||||
set (TEST_RESULT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
@ -239,15 +239,15 @@ if (TEST_GREP_COMPARE)
|
||||
# TEST_REFERENCE should always be matched
|
||||
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
|
||||
string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
|
||||
if (${TEST_RESULT} STREQUAL "0")
|
||||
if ("${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
|
||||
endif ()
|
||||
|
||||
string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
|
||||
if (${TEST_EXPECT} STREQUAL "1")
|
||||
if ("${TEST_EXPECT}" STREQUAL "1")
|
||||
# TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
|
||||
string (LENGTH "${TEST_MATCH}" TEST_RESULT)
|
||||
if (NOT ${TEST_RESULT} STREQUAL "0")
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
@ -60,12 +60,12 @@ if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err)
|
||||
endif ()
|
||||
|
||||
# if the return value is !=${TEST_EXPECT} bail out
|
||||
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
|
||||
if (NOT TEST_NOERRDISPLAY)
|
||||
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out)
|
||||
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out TEST_STREAM)
|
||||
message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}")
|
||||
endif ()
|
||||
message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}")
|
||||
endif ()
|
||||
endif ()
|
||||
message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
|
||||
endif ()
|
||||
|
@ -57,15 +57,15 @@ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
|
||||
# TEST_REFERENCE should always be matched
|
||||
string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
|
||||
string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
|
||||
if (${TEST_RESULT} STREQUAL "0")
|
||||
if ("${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
|
||||
endif ()
|
||||
|
||||
string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
|
||||
if (${TEST_EXPECT} STREQUAL "1")
|
||||
if ("${TEST_EXPECT}" STREQUAL "1")
|
||||
# TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
|
||||
string (LENGTH "${TEST_MATCH}" TEST_RESULT)
|
||||
if (NOT ${TEST_RESULT} STREQUAL "0")
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
@ -87,7 +87,7 @@ if (TEST_REGEX)
|
||||
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
|
||||
string (REGEX MATCH "${TEST_REGEX}" REGEX_MATCH ${TEST_STREAM})
|
||||
string (COMPARE EQUAL "${REGEX_MATCH}" "${TEST_MATCH}" REGEX_RESULT)
|
||||
if (${REGEX_RESULT} STREQUAL "0")
|
||||
if ("${REGEX_RESULT}" STREQUAL "0")
|
||||
message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}")
|
||||
endif ()
|
||||
endif ()
|
||||
@ -106,7 +106,7 @@ if (TEST_APPEND)
|
||||
endif ()
|
||||
|
||||
# if the return value is !=${TEST_EXPECT} bail out
|
||||
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
|
||||
if (NOT TEST_NOERRDISPLAY)
|
||||
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
|
||||
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
|
||||
@ -193,13 +193,13 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
set (TEST_RESULT 0)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
|
||||
list (LENGTH test_act len_act)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
|
||||
list (LENGTH test_ref len_ref)
|
||||
if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
|
||||
if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
|
||||
math (EXPR _FP_LEN "${len_ref} - 1")
|
||||
foreach (line RANGE 0 ${_FP_LEN})
|
||||
list (GET test_act ${line} str_act)
|
||||
@ -212,14 +212,14 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
else ()
|
||||
if (${len_act} STREQUAL "0")
|
||||
if ("${len_act}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
|
||||
endif ()
|
||||
if (${len_ref} STREQUAL "0")
|
||||
if ("${len_ref}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT ${len_act} STREQUAL ${len_ref})
|
||||
if (NOT "${len_act}" STREQUAL "${len_ref}")
|
||||
set (TEST_RESULT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
@ -227,7 +227,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
message (STATUS "COMPARE Result: ${TEST_RESULT}")
|
||||
|
||||
# again, if return value is !=0 scream and shout
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
|
||||
endif ()
|
||||
|
||||
@ -243,14 +243,14 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
|
||||
RESULT_VARIABLE TEST_RESULT
|
||||
)
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
set (TEST_RESULT 0)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
|
||||
list (LENGTH test_act len_act)
|
||||
file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
|
||||
list (LENGTH test_ref len_ref)
|
||||
math (EXPR _FP_LEN "${len_ref} - 1")
|
||||
if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
|
||||
if (NOT "${len_act}" STREQUAL "0" AND NOT "${len_ref}" STREQUAL "0")
|
||||
math (EXPR _FP_LEN "${len_ref} - 1")
|
||||
foreach (line RANGE 0 ${_FP_LEN})
|
||||
list (GET test_act ${line} str_act)
|
||||
@ -263,14 +263,14 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
else ()
|
||||
if (${len_act} STREQUAL "0")
|
||||
if ("${len_act}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
|
||||
endif ()
|
||||
if (${len_ref} STREQUAL "0")
|
||||
if ("${len_ref}" STREQUAL "0")
|
||||
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT ${len_act} STREQUAL ${len_ref})
|
||||
if (NOT "${len_act}" STREQUAL "${len_ref}")
|
||||
set (TEST_RESULT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
@ -278,7 +278,7 @@ if (NOT TEST_SKIP_COMPARE)
|
||||
message (STATUS "COMPARE Result: ${TEST_RESULT}")
|
||||
|
||||
# again, if return value is !=0 scream and shout
|
||||
if (NOT ${TEST_RESULT} STREQUAL 0)
|
||||
if (NOT "${TEST_RESULT}" STREQUAL "0")
|
||||
message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
@ -101,7 +101,7 @@ if (BUILD_TESTING)
|
||||
endif (H5_HAVE_FILTER_SZIP)
|
||||
|
||||
foreach (example ${HDF_JAVA_EXAMPLES})
|
||||
if (${example} STREQUAL "H5Ex_D_External")
|
||||
if ("${example}" STREQUAL "H5Ex_D_External")
|
||||
add_test (
|
||||
NAME JAVA_datasets-${example}-clear-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
@ -129,7 +129,7 @@ if (BUILD_TESTING)
|
||||
)
|
||||
set_tests_properties (JAVA_datasets-${example}-copy-objects PROPERTIES DEPENDS JAVA_datasets-${example}-clear-objects)
|
||||
set (last_test "JAVA_datasets-${example}-copy-objects")
|
||||
if (${example} STREQUAL "H5Ex_D_Szip")
|
||||
if ("${example}" STREQUAL "H5Ex_D_Szip")
|
||||
if (USE_FILTER_SZIP)
|
||||
ADD_H5_TEST (${example} 0)
|
||||
endif ()
|
||||
|
@ -90,8 +90,8 @@ ENDMACRO ()
|
||||
|
||||
if (BUILD_TESTING)
|
||||
foreach (example ${HDF_JAVA_EXAMPLES})
|
||||
if (NOT ${example} STREQUAL "H5Ex_G_Iterate" AND NOT ${example} STREQUAL "H5Ex_G_Visit")
|
||||
if (${example} STREQUAL "H5Ex_G_Compact")
|
||||
if (NOT "${example}" STREQUAL "H5Ex_G_Iterate" AND NOT "${example}" STREQUAL "H5Ex_G_Visit")
|
||||
if ("${example}" STREQUAL "H5Ex_G_Compact")
|
||||
add_test (
|
||||
NAME JAVA_groups-${example}-clear-h5s
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
@ -661,7 +661,7 @@ foreach (test ${H5TEST_TESTS})
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
|
||||
)
|
||||
else ()
|
||||
if (${test} STREQUAL "big" AND CYGWIN)
|
||||
if ("${test}" STREQUAL "big" AND CYGWIN)
|
||||
add_test (NAME H5TEST-${test}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
|
||||
)
|
||||
@ -702,7 +702,7 @@ if (BUILD_SHARED_LIBS)
|
||||
)
|
||||
|
||||
foreach (test ${H5TEST_TESTS})
|
||||
if (${test} STREQUAL "big" AND CYGWIN)
|
||||
if ("${test}" STREQUAL "big" AND CYGWIN)
|
||||
add_test (NAME H5TEST-shared-${test}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
|
||||
)
|
||||
@ -1115,8 +1115,8 @@ if (HDF5_TEST_VFD)
|
||||
|
||||
# Windows only macro
|
||||
macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
|
||||
if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
|
||||
if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
|
||||
if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
|
||||
if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
|
||||
if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_test (NAME VFD-${vfdname}-${vfdtest}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@ -1205,7 +1205,7 @@ if (HDF5_TEST_VFD)
|
||||
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
|
||||
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
|
||||
)
|
||||
if (BUILD_SHARED_LIBS AND NOT ${vfdtest} STREQUAL "cache")
|
||||
if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache")
|
||||
add_test (NAME VFD-${vfdname}-${vfdtest}-shared
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
|
||||
|
@ -71,13 +71,13 @@
|
||||
endif ()
|
||||
|
||||
# resultcode=2 will cause the test to skip the diff test
|
||||
if (NOT ${resultcode} STREQUAL "2")
|
||||
if (NOT "${resultcode}" STREQUAL "2")
|
||||
add_test (
|
||||
NAME H5COPY_F-${testname}-DIFF
|
||||
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
|
||||
)
|
||||
SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
endif ()
|
||||
@ -107,13 +107,13 @@
|
||||
endif ()
|
||||
|
||||
# resultcode=2 will cause the test to skip the diff test
|
||||
if (NOT ${resultcode} STREQUAL "2")
|
||||
if (NOT "${resultcode}" STREQUAL "2")
|
||||
add_test (
|
||||
NAME H5COPY-${testname}-DIFF
|
||||
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
|
||||
)
|
||||
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
endif ()
|
||||
@ -157,13 +157,13 @@
|
||||
)
|
||||
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
|
||||
# resultcode=2 will cause the test to skip the diff test
|
||||
if (NOT ${resultcode} STREQUAL "2")
|
||||
if (NOT "${resultcode}" STREQUAL "2")
|
||||
add_test (
|
||||
NAME H5COPY-${testname}-DIFF
|
||||
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
|
||||
)
|
||||
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
endif ()
|
||||
@ -198,13 +198,13 @@
|
||||
)
|
||||
set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
|
||||
# resultcode=2 will cause the test to skip the diff test
|
||||
if (NOT ${resultcode} STREQUAL "2")
|
||||
if (NOT "${resultcode}" STREQUAL "2")
|
||||
add_test (
|
||||
NAME H5COPY_SAME-${testname}-DIFF
|
||||
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
|
||||
)
|
||||
SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
endif ()
|
||||
@ -218,7 +218,7 @@
|
||||
# If using memchecker add tests without using scripts
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
|
@ -366,7 +366,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
|
||||
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
@ -396,7 +396,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DIFF_ERR-${resultfile} COMMAND $<TARGET_FILE:h5diff> --enable-error-stack ${ARGN})
|
||||
set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DIFF_ERR-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
@ -428,7 +428,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
|
||||
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
@ -467,7 +467,7 @@
|
||||
testfiles/${resultfile}.out
|
||||
testfiles/${resultfile}.out.err
|
||||
)
|
||||
if (${resultcode} STREQUAL "2")
|
||||
if ("${resultcode}" STREQUAL "2")
|
||||
add_test (
|
||||
NAME H5DIFF_UD-${testname}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
@ -512,7 +512,7 @@
|
||||
testfiles/${resultfile}_ERR.out
|
||||
testfiles/${resultfile}_ERR.out.err
|
||||
)
|
||||
if (${resultcode} STREQUAL "2")
|
||||
if ("${resultcode}" STREQUAL "2")
|
||||
add_test (
|
||||
NAME H5DIFF_UD_ERR-${testname}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
|
@ -422,7 +422,7 @@
|
||||
endmacro ()
|
||||
|
||||
macro (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype)
|
||||
if (${testtype} STREQUAL "SKIP")
|
||||
if ("${testtype}" STREQUAL "SKIP")
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (
|
||||
NAME H5DUMP-${skipresultfile}-SKIPPED
|
||||
@ -439,7 +439,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
@ -472,7 +472,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
|
||||
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
@ -505,7 +505,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
@ -545,7 +545,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
|
@ -103,7 +103,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_vds_test}" STREQUAL "")
|
||||
@ -129,7 +129,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> -p ${ARGN})
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_vds_test}" STREQUAL "")
|
||||
|
@ -161,7 +161,7 @@
|
||||
##############################################################################
|
||||
|
||||
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
|
||||
@ -177,7 +177,7 @@
|
||||
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")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_xml_test}" STREQUAL "")
|
||||
|
@ -129,7 +129,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
|
||||
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
|
@ -74,7 +74,7 @@
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
|
||||
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
|
||||
if (${resultcode} STREQUAL "1")
|
||||
if ("${resultcode}" STREQUAL "1")
|
||||
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
|
@ -1264,7 +1264,7 @@
|
||||
if (WIN32)
|
||||
set (TESTRETVAL -1)
|
||||
endif ()
|
||||
ADD_H5_CMP_TEST (plugin_zero "" "TEST" ${TESTRETVAL} h5repack_layout.h5 -v -f UD=250,0,0)
|
||||
ADD_H5_MASK_TEST (plugin_zero "TEST" ${TESTRETVAL} h5repack_layout.h5 --enable-error-stack -v -f UD=250,0,0)
|
||||
|
||||
if (HDF5_TEST_VFD)
|
||||
# Run test with different Virtual File Driver
|
||||
|
@ -1,9 +1,20 @@
|
||||
Objects to modify layout are...
|
||||
Objects to apply filter are...
|
||||
User Defined 250
|
||||
Making file <out-plugin_zero.h5repack_layout.h5>...
|
||||
-----------------------------------------
|
||||
Type Filter (Compression) Name
|
||||
Objects to modify layout areversion (number)) Name
|
||||
-----------------------------------------
|
||||
group /
|
||||
h5repack error: <h5repack_layout.h5>: Could not copy data to: out-plugin_zero.h5repack_layout.h5
|
||||
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
|
||||
#000: (file name) line (number) in H5Pset_filter(): failed to call private function
|
||||
major: Property lists
|
||||
minor: Can't set value
|
||||
#001: (file name) line (number) in H5P__set_filter(): failed to load dynamically loaded plugin
|
||||
major: Data filters
|
||||
minor: Unable to load metadata into cache
|
||||
H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
|
||||
#000: (file name) line (number) in copy_objects(): do_copy_objects from <h5repack_layout.h5> could not copy data to <out-plugin_zero.h5repack_layout.h5>
|
||||
major: Failure in tools library
|
||||
minor: error in function
|
||||
#001: (file name) line (number) in do_copy_objects(): apply_filters failed
|
||||
major: Failure in tools library
|
||||
minor: error in function
|
||||
#002: (file name) line (number) in apply_filters(): H5Pset_filter failed
|
||||
major: Failure in tools library
|
||||
minor: error in function
|
||||
|
@ -78,7 +78,7 @@
|
||||
# If using memchecker add tests without using scripts
|
||||
if (HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
|
||||
if (NOT ${resultcode} STREQUAL "0")
|
||||
if (NOT "${resultcode}" STREQUAL "0")
|
||||
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
|
||||
endif ()
|
||||
if (NOT "${last_test}" STREQUAL "")
|
||||
|
Loading…
Reference in New Issue
Block a user