summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-03-06 17:12:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-03-06 17:12:56 (GMT)
commitb765eca684dcc60600d0e72572cb58872acc2aec (patch)
tree547c565b2564be6d241a7459a924d3bae39cd8ac /tools
parent7edf623f01fbd4944fd6dd6c3169e14e238df8a8 (diff)
parent5a537b675b4d3428691bac6fa6c8e760e5c8f661 (diff)
downloadhdf5-b765eca684dcc60600d0e72572cb58872acc2aec.zip
hdf5-b765eca684dcc60600d0e72572cb58872acc2aec.tar.gz
hdf5-b765eca684dcc60600d0e72572cb58872acc2aec.tar.bz2
Merge pull request #2440 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_8 to hdf5_1_8
* commit '5a537b675b4d3428691bac6fa6c8e760e5c8f661': Correct grep text for filter test Revert incorrect bool type Fix CMake compare commands
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/CMakeTests.cmake54
-rw-r--r--tools/h5dump/testh5dump.sh.in6
-rw-r--r--tools/h5repack/CMakeTests.cmake60
-rw-r--r--tools/perform/pio_standalone.h4
-rw-r--r--tools/perform/sio_standalone.h4
5 files changed, 83 insertions, 45 deletions
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index 487b8aa..36a193b 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -529,14 +529,12 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
endif ()
endmacro ()
@@ -572,20 +570,18 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- add_test (
- NAME H5DUMP-${resultfile}-output-cmp-ddl
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${ddlfile}.txt ${ddlfile}.exp
- )
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
- endif ()
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ add_test (
+ NAME H5DUMP-${resultfile}-output-cmp-ddl
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${ddlfile}.txt ${ddlfile}.exp
+ )
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
endif ()
endmacro ()
@@ -602,14 +598,12 @@
)
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
- if(NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- add_test (
- NAME H5DUMP-output-cmp-${resultfile}
- COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${resultfile}.txt ${resultfile}.exp
- )
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
- endif ()
+ add_test (
+ NAME H5DUMP-output-cmp-${resultfile}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp
+ )
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
endif ()
endmacro ()
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 28a7855..dbe0412 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -25,10 +25,10 @@ EXIT_FAILURE=1
DUMPER=h5dump # The tool name
DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
-H5DIFF=../h5diff/h5diff # The h5diff tool name
+H5DIFF=../h5diff/h5diff # The h5diff tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
-H5IMPORT=../h5import/h5import # The h5import tool name
+H5IMPORT=../h5import/h5import # The h5import tool name
H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
RM='rm -rf'
@@ -1418,7 +1418,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-GREPTEST2 ERRTXT "filter plugins disabled" filter_fail.ddl --enable-error-stack filter_fail.h5
+GREPTEST2 ERRTXT "is not registered" filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 2e66a69..df3ed82 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -484,12 +484,16 @@
macro (ADD_H5_TEST_META testname testfile)
# Remove any output file left over from previous test run
add_test (
- NAME H5REPACK_META-${testname}_N-clear-objects
+ NAME H5REPACK_META-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
testfiles/out-${testname}_N.${testname}.h5
+ testfiles/out-${testname}_N.${testname}.out
+ testfiles/out-${testname}_N.${testname}.out.err
testfiles/out-${testname}_M.${testname}.h5
+ testfiles/out-${testname}_M.${testname}.out
+ testfiles/out-${testname}_M.${testname}.out.err
)
- set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES
+ set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES
FIXTURES_REQUIRED clear_h5repack
)
add_test (
@@ -497,21 +501,61 @@
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N-clear-objects
+ DEPENDS H5REPACK_META-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_META-${testname}_N_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=${testfile};out-${testname}_N.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_N.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_N.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_N_DFF PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_N
)
add_test (
NAME H5REPACK_META-${testname}_M
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N
+ DEPENDS H5REPACK_META-${testname}_N_DFF
)
-
- add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
- set_tests_properties (H5REPACK_META-${testname} PROPERTIES
- WILL_FAIL "true"
+ add_test (
+ NAME H5REPACK_META-${testname}_M_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=${testfile};out-${testname}_M.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_M.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_M.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_M_DFF PROPERTIES
DEPENDS H5REPACK_META-${testname}_M
)
+ add_test (NAME H5REPACK_META-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_ONEFILE=out-${testname}_N.${testname}.out"
+ -D "TEST_TWOFILE=out-${testname}_M.${testname}.h5"
+ -D "TEST_FUNCTION=LTEQ"
+ -P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake"
+ )
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DISABLED "true"
+ )
+ endif ()
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_M_DFF
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)
diff --git a/tools/perform/pio_standalone.h b/tools/perform/pio_standalone.h
index cf6d980..deebd4d 100644
--- a/tools/perform/pio_standalone.h
+++ b/tools/perform/pio_standalone.h
@@ -470,10 +470,10 @@ extern char *strdup(const char *s);
* HDF Boolean type.
*/
#ifndef FALSE
-# define FALSE false
+# define FALSE 0
#endif
#ifndef TRUE
-# define TRUE true
+# define TRUE 1
#endif
/** From h5test.h **/
diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h
index 45f6d25..4743a42 100644
--- a/tools/perform/sio_standalone.h
+++ b/tools/perform/sio_standalone.h
@@ -485,10 +485,10 @@ extern char *strdup(const char *s);
* HDF Boolean type.
*/
#ifndef FALSE
-# define FALSE false
+# define FALSE 0
#endif
#ifndef TRUE
-# define TRUE true
+# define TRUE 1
#endif
/** From h5test.h **/