summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake27
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake96
2 files changed, 83 insertions, 40 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index cd20f77..a28a282 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -727,6 +727,7 @@
set (FILE15 h5repack_named_dtypes.h5)
set (FILE16 tfamily%05d.h5) # located in common testfiles folder
set (FILE18 h5repack_layout2.h5)
+ set (FILE19 h5repack_layout3.h5)
set (FILE_REF h5repack_refs.h5)
set (FILE_ATTR_REF h5repack_attr_refs.h5)
set (FILEV1 1_vds.h5)
@@ -869,11 +870,11 @@
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
endif ()
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
+ set (last_test "H5REPACK-testh5repack_detect_szip")
- add_test (NAME H5REPACK-h5repacktest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repacktest>)
- set_tests_properties (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
- set (last_test "H5REPACK-h5repacktest")
-
+# add_test (NAME H5REPACK-h5repacktest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repacktest>)
+# set_tests_properties (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
+# set (last_test "H5REPACK-h5repacktest")
#
# The tests
# We use the files generated by h5repacktst
@@ -1194,14 +1195,14 @@
# Use first dset to test.
#---------------------------------------------------------------------------
# chunk to chunk - specify chunk dim bigger than any current dim
- ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
+ ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 ${FILE19} chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
# chunk to contiguous
- ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
+ ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 ${FILE19} chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
# chunk to compact - convert big dataset (should be > 64k) for this purpose,
# should remain as original layout (chunk)
- ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
+ ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 ${FILE19} chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
#--------------------------------------------------------------------------
# Test -f for some specific cases. Chunked dataset with unlimited max dims.
@@ -1211,16 +1212,16 @@
# - should not change max dims from unlimit
# chunk dim is bigger than dataset dim. ( dset size < 64k )
- ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE)
+ ADD_H5_VERIFY_TEST (error1 "TEST" 0 ${FILE19} chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE)
# chunk dim is bigger than dataset dim. ( dset size > 64k )
- ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE)
+ ADD_H5_VERIFY_TEST (error2 "TEST" 0 ${FILE19} chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE)
# chunk dims are smaller than dataset dims. ( dset size < 64k )
- ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE)
+ ADD_H5_VERIFY_TEST (error3 "TEST" 0 ${FILE19} chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE)
# file input - should not fail
- ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
+ ADD_H5_TEST (error4 "TEST" ${FILE19} -f NONE)
#--------------------------------------------------------------------------
# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
@@ -1228,9 +1229,9 @@
# (HDFFV-8214)
#--------------------------------------------------------------------------
# chunk dim is bigger than dataset dim. should succeed.
- ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
+ ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 ${FILE19} chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
# chunk dim is smaller than dataset dim. should succeed.
- ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
+ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 ${FILE19} chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake
index f88f147..c1a280b 100644
--- a/tools/test/h5repack/CMakeVFDTests.cmake
+++ b/tools/test/h5repack/CMakeVFDTests.cmake
@@ -16,18 +16,19 @@
##############################################################################
##############################################################################
- set (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
+set (VFD_LIST
+ sec2
+ stdio
+ core
+ core_paged
+ split
+ multi
+ family
+)
- if (DIRECT_VFD)
- set (VFD_LIST ${VFD_LIST} direct)
- endif ()
+if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+endif ()
##############################################################################
##############################################################################
@@ -35,20 +36,61 @@
##############################################################################
##############################################################################
- macro (ADD_VFD_TEST vfdname resultcode)
+macro (ADD_VFD_TEST vfdname resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
+ add_test (
+ NAME H5REPACK-${vfdname}-h5repacktest-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ bounds_latest_latest.h5
+ h5repack_attr.h5
+ h5repack_attr_refs.h5
+ h5repack_deflate.h5
+ h5repack_early.h5
+ h5repack_ext.h5
+ h5repack_fill.h5
+ h5repack_filters.h5
+ h5repack_fletcher.h5
+ h5repack_hlink.h5
+ h5repack_layout.h5
+ h5repack_layouto.h5
+ h5repack_layout2.h5
+ h5repack_layout3.h5
+ h5repack_layout.UD.h5
+ h5repack_named_dtypes.h5
+ h5repack_nested_8bit_enum.h5
+ h5repack_nested_8bit_enum_deflated.h5
+ h5repack_nbit.h5
+ h5repack_objs.h5
+ h5repack_refs.h5
+ h5repack_shuffle.h5
+ h5repack_soffset.h5
+ h5repack_szip.h5
+ # fsm
+ h5repack_aggr.h5
+ h5repack_fsm_aggr_nopersist.h5
+ h5repack_fsm_aggr_persist.h5
+ h5repack_none.h5
+ h5repack_paged_nopersist.h5
+ h5repack_paged_persist.h5
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname}
+ )
add_test (
- NAME H5REPACK-VFD-${vfdname}-h5repacktest
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=h5repacktest"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ NAME H5REPACK_VFD-${vfdname}-h5repacktest
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-h5repacktest.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- endmacro ()
+ set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest-clear-objects)
+ set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
+ endif ()
+endmacro ()
##############################################################################
##############################################################################
@@ -56,7 +98,7 @@
##############################################################################
##############################################################################
- # Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- endforeach ()
+# Run test with different Virtual File Driver
+foreach (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+endforeach ()