summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-18 20:06:14 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-18 20:06:14 (GMT)
commitd68de1621c98cc0b5d8d82af01ffcb608603366d (patch)
tree1a519b9af83e879eeb91cd55139f27df70c87fd8
parentcf3342f8fc53108e831b208d8ccb48628fb23e51 (diff)
downloadhdf5-d68de1621c98cc0b5d8d82af01ffcb608603366d.zip
hdf5-d68de1621c98cc0b5d8d82af01ffcb608603366d.tar.gz
hdf5-d68de1621c98cc0b5d8d82af01ffcb608603366d.tar.bz2
Fix format convert error mask test
-rw-r--r--MANIFEST1
-rw-r--r--tools/test/h5format_convert/CMakeTests.cmake58
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_err.ddl8
-rw-r--r--tools/test/h5format_convert/testfiles/h5fc_v_err.err8
4 files changed, 66 insertions, 9 deletions
diff --git a/MANIFEST b/MANIFEST
index 39b3432..24ab056 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1354,6 +1354,7 @@
./tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl
./tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl
./tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
+./tools/test/h5format_convert/testfiles/h5fc_v_err.err
./tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl
./tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 4af220b..c2b2d3a 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -140,6 +140,62 @@
endif ()
endmacro ()
+ macro (ADD_H5_MASK_OUTPUT testname resultfile resultcode testfile)
+ # If using memchecker add tests without using scripts
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5FC-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/outtmp.h5
+ ./testfiles/${testname}.out
+ ./testfiles/${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ if (NOT "${testfile}" STREQUAL "")
+ add_test (
+ NAME H5FC-${testname}-${testfile}-tmpfile
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
+ add_test (
+ NAME H5FC-${testname}-${testfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>"
+ -D "TEST_ARGS=${ARGN};outtmp.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
+ set (last_test "H5FC-${testname}-${testfile}")
+ else ()
+ add_test (
+ NAME H5FC-${testname}-NA
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5FC-${testname}-NA PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
+ set (last_test "H5FC-${testname}-NA")
+ endif ()
+ endif ()
+ endmacro ()
+
macro (ADD_H5_TEST testname resultcode testfile)
# If using memchecker add tests without using scripts
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -391,7 +447,7 @@
#
#
# h5format_convert -v h5fc_err_level.h5 (error encountered in converting the dataset)
- ADD_H5_OUTPUT (h5fc_v_err h5fc_v_err.ddl 1 h5fc_err_level.h5 -v)
+ ADD_H5_MASK_OUTPUT (h5fc_v_err h5fc_v_err.ddl 1 h5fc_err_level.h5 -v)
#
#
#
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
index fa2f078..0b7d0ac 100644
--- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl
@@ -10,11 +10,3 @@ Dataset's chunk indexing type is not version 1 B-tree
Converting the dataset...
Error encountered
Close the file
-h5format_convert error: unable to downgrade dataset "/DSET_ERR"
-H5tools-DIAG: Error detected in HDF5:tools (1.11.0) thread 0:
- #000: /home/byrn/HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 1062 in h5trav_visit(): traverse failed
- major: Failure in tools library
- minor: error in function
- #001: /home/byrn/HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 290 in traverse(): H5Lvisit_by_name failed
- major: Failure in tools library
- minor: error in function
diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.err b/tools/test/h5format_convert/testfiles/h5fc_v_err.err
new file mode 100644
index 0000000..d85a999
--- /dev/null
+++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.err
@@ -0,0 +1,8 @@
+h5format_convert error: unable to downgrade dataset "/DSET_ERR"
+H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
+ #000: (file name) line (number) in h5trav_visit(): traverse failed
+ major: Failure in tools library
+ minor: error in function
+ #001: (file name) line (number) in traverse(): H5Lvisit_by_name failed
+ major: Failure in tools library
+ minor: error in function