summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-08-11 13:52:25 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-08-11 13:52:25 (GMT)
commitc3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d (patch)
treee65a730fa7f989a58b04f957e6194fbed0912de0 /test
parentdeccf66684b47acc62b65d53a084a32a48e99b61 (diff)
parent3b4696ccd16c2b98e2700a46bf7a5c76ef4a9764 (diff)
downloadhdf5-c3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d.zip
hdf5-c3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d.tar.gz
hdf5-c3649ea51764b1e7d2b82ca3d5a2ba4053f34a6d.tar.bz2
[svn-r27491] merge from trunk.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt160
-rw-r--r--test/CMakeTests.cmake570
-rw-r--r--test/mf.c70
-rw-r--r--test/trefer.c6
4 files changed, 670 insertions, 136 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5ba40db..29d0ac5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -26,8 +26,8 @@ set (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/h5test.h
)
-add_library (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} " " " ")
+add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
+TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ")
if (MSVC)
target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
endif (MSVC)
@@ -35,16 +35,34 @@ if (MINGW)
target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib")
endif (MINGW)
target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE})
+H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC)
set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+if (BUILD_SHARED_LIBS)
+ add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS})
+ TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ")
+ if (MSVC)
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "ws2_32.lib")
+ endif (MSVC)
+ if (MINGW)
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib")
+ endif (MINGW)
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED)
+ set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES
+ FOLDER libraries/test
+ COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
+ )
+endif (BUILD_SHARED_LIBS)
+
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
-if (BUILD_SHARED_LIBS)
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1")
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
@@ -67,12 +85,12 @@ if (BUILD_SHARED_LIBS)
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
- TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ")
+ add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
- ${LIB_TYPE}
+ SHARED
HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
)
@@ -85,7 +103,7 @@ if (BUILD_SHARED_LIBS)
TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
)
@@ -98,12 +116,12 @@ if (BUILD_SHARED_LIBS)
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
- TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ")
+ add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
+ TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
- ${LIB_TYPE}
+ SHARED
HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
)
@@ -116,7 +134,7 @@ if (BUILD_SHARED_LIBS)
TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
)
@@ -141,11 +159,11 @@ if (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SOURCE_DIR}/${test_vol_lib}.c)
- TARGET_C_PROPERTIES (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} " " " ")
+ TARGET_C_PROPERTIES (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TEST_VOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_VOL_PLUGIN_LIB_NAME}
- ${LIB_TYPE}
+ SHARED
HDF5_TEST_VOL_PLUGIN_LIB_NAME_RELEASE
HDF5_TEST_VOL_PLUGIN_LIB_NAME_DEBUG
)
@@ -163,7 +181,6 @@ if (BUILD_SHARED_LIBS)
"${CMAKE_BINARY_DIR}/voltestdir/$<TARGET_FILE_NAME:${HDF5_TEST_VOL_PLUGIN_LIB_TARGET}>"
)
endforeach (test_vol_lib ${TEST_VOL_PLUGIN_LIBS})
-endif (BUILD_SHARED_LIBS)
set (testhdf5_SRCS
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
@@ -195,17 +212,31 @@ set (testhdf5_SRCS
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SRCS})
-TARGET_NAMING (testhdf5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ")
+TARGET_NAMING (testhdf5 STATIC)
+TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (testhdf5 PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (testhdf5-shared ${testhdf5_SRCS})
+ TARGET_NAMING (testhdf5-shared SHARED)
+ TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
+ target_link_libraries (testhdf5-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
MACRO (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- TARGET_NAMING (${file} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${file} ${LIB_TYPE} " " " ")
+ TARGET_NAMING (${file} STATIC)
+ TARGET_C_PROPERTIES (${file} STATIC " " " ")
target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${file} PROPERTIES FOLDER test)
+ if (BUILD_SHARED_LIBS)
+ add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ TARGET_NAMING (${file}-shared SHARED)
+ TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
+ target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (${file}-shared PROPERTIES FOLDER test)
+ endif (BUILD_SHARED_LIBS)
ENDMACRO (ADD_H5_EXE file)
set (H5_TESTS
@@ -278,24 +309,45 @@ endforeach (test ${H5_TESTS})
#-- Adding test for cache
add_executable (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache ${LIB_TYPE} " " " ")
+TARGET_NAMING (cache STATIC)
+TARGET_C_PROPERTIES (cache STATIC " " " ")
target_link_libraries (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (cache-shared ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+ TARGET_NAMING (cache-shared SHARED)
+ TARGET_C_PROPERTIES (cache-shared SHARED " " " ")
+ target_link_libraries (cache-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (cache-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
#-- Adding test for cache_api
add_executable (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache_api ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_api ${LIB_TYPE} " " " ")
+TARGET_NAMING (cache_api STATIC)
+TARGET_C_PROPERTIES (cache_api STATIC " " " ")
target_link_libraries (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_api PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (cache_api-shared ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+ TARGET_NAMING (cache_api-shared SHARED)
+ TARGET_C_PROPERTIES (cache_api-shared SHARED " " " ")
+ target_link_libraries (cache_api-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (cache_api-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
#-- Adding test for cache_tagging
add_executable (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache_tagging ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_tagging ${LIB_TYPE} " " " ")
+TARGET_NAMING (cache_tagging STATIC)
+TARGET_C_PROPERTIES (cache_tagging STATIC " " " ")
target_link_libraries (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_tagging PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (cache_tagging-shared ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+ TARGET_NAMING (cache_tagging-shared SHARED)
+ TARGET_C_PROPERTIES (cache_tagging-shared SHARED " " " ")
+ target_link_libraries (cache_tagging-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (cache_tagging-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
#-- Adding test for ttsafe
add_executable (ttsafe
@@ -305,37 +357,71 @@ add_executable (ttsafe
${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
)
-TARGET_NAMING (ttsafe ${LIB_TYPE})
-TARGET_C_PROPERTIES (ttsafe ${LIB_TYPE} " " " ")
+TARGET_NAMING (ttsafe STATIC)
+TARGET_C_PROPERTIES (ttsafe STATIC " " " ")
target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (ttsafe PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (ttsafe-shared
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
+ )
+ TARGET_NAMING (ttsafe-shared SHARED)
+ TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ")
+ target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
#-- Adding test for err_compat
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_executable (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
- TARGET_NAMING (err_compat ${LIB_TYPE})
- TARGET_C_PROPERTIES (err_compat ${LIB_TYPE} " " " ")
+ TARGET_NAMING (err_compat STATIC)
+ TARGET_C_PROPERTIES (err_compat STATIC " " " ")
target_link_libraries (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (err_compat PROPERTIES FOLDER test)
+ if (BUILD_SHARED_LIBS)
+ add_executable (err_compat-shared ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
+ TARGET_NAMING (err_compat-shared SHARED)
+ TARGET_C_PROPERTIES (err_compat-shared SHARED " " " ")
+ target_link_libraries (err_compat-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (err_compat-shared PROPERTIES FOLDER test)
+ endif (BUILD_SHARED_LIBS)
endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-- Adding test for error_test
add_executable (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
-TARGET_NAMING (error_test ${LIB_TYPE})
-TARGET_C_PROPERTIES (error_test ${LIB_TYPE} " " " ")
+TARGET_NAMING (error_test STATIC)
+TARGET_C_PROPERTIES (error_test STATIC " " " ")
target_link_libraries (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (error_test PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (error_test-shared ${HDF5_TEST_SOURCE_DIR}/error_test.c)
+ TARGET_NAMING (error_test-shared SHARED)
+ TARGET_C_PROPERTIES (error_test-shared SHARED " " " ")
+ target_link_libraries (error_test-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (error_test-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
#-- Adding test for links_env
add_executable (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
-TARGET_NAMING (links_env ${LIB_TYPE})
-TARGET_C_PROPERTIES (links_env ${LIB_TYPE} " " " ")
+TARGET_NAMING (links_env STATIC)
+TARGET_C_PROPERTIES (links_env STATIC " " " ")
target_link_libraries (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (links_env PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (links_env-shared ${HDF5_TEST_SOURCE_DIR}/links_env.c)
+ TARGET_NAMING (links_env-shared SHARED)
+ TARGET_C_PROPERTIES (links_env-shared SHARED " " " ")
+ target_link_libraries (links_env-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (links_env-shared PROPERTIES FOLDER test)
+endif (BUILD_SHARED_LIBS)
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
-file (WRITE ${GREP_RUNNER}
+file (WRITE ${GREP_RUNNER}
"file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
if (\${TEST_RESULT} STREQUAL \"0\")
message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
@@ -354,6 +440,12 @@ if (BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (plugin SHARED " " " ")
target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
set_target_properties (plugin PROPERTIES FOLDER test)
+else (BUILD_SHARED_LIBS)
+ add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+ TARGET_NAMING (plugin STATIC)
+ TARGET_C_PROPERTIES (plugin STATIC " " " ")
+ target_link_libraries (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ set_target_properties (plugin PROPERTIES FOLDER test)
endif (BUILD_SHARED_LIBS)
include (CMakeTests.cmake)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index c7803f6..5fe51ed 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -9,6 +9,12 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files")
+if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files")
+endif (BUILD_SHARED_LIBS)
+
if (HDF5_TEST_VFD)
set (VFD_LIST
sec2
@@ -23,6 +29,9 @@ if (HDF5_TEST_VFD)
endif (DIRECT_VFD)
foreach (vfdtest ${VFD_LIST})
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
+ #if (BUILD_SHARED_LIBS)
+ # file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared")
+ #endif (BUILD_SHARED_LIBS)
endforeach (vfdtest ${VFD_LIST})
endif (HDF5_TEST_VFD)
@@ -35,25 +44,41 @@ set (HDF5_TEST_FILES
foreach (h5_tfile ${HDF5_TEST_FILES})
set (dest "${PROJECT_BINARY_DIR}/H5TEST/${h5_tfile}")
- #message (STATUS " Copying ${h5_tfile}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIBSH_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (h5_tfile ${HDF5_TEST_FILES})
if (HDF5_TEST_VFD)
foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_TEST_FILES})
set (dest "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}")
- #message (STATUS " Copying ${h5_tfile}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIBSH_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (h5_tfile ${HDF5_TEST_FILES})
endforeach (vfdtest ${VFD_LIST})
endif (HDF5_TEST_VFD)
@@ -71,25 +96,41 @@ set (HDF5_REFERENCE_FILES
foreach (ref_file ${HDF5_REFERENCE_FILES})
set (dest "${PROJECT_BINARY_DIR}/H5TEST/${ref_file}")
- #message (STATUS " Copying ${h5_file}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIBSH_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (ref_file ${HDF5_REFERENCE_FILES})
if (HDF5_TEST_VFD)
foreach (vfdtest ${VFD_LIST})
foreach (ref_file ${HDF5_REFERENCE_FILES})
set (dest "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}")
- #message (STATUS " Copying ${h5_file}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (ref_file ${HDF5_REFERENCE_FILES})
endforeach (vfdtest ${VFD_LIST})
endif (HDF5_TEST_VFD)
@@ -126,13 +167,21 @@ set (HDF5_REFERENCE_PLIST_FILES
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
set (dest "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}")
- #message (STATUS " Copying ${plistfile} to ${dset}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files/${plistfile}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIBSH_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
# --------------------------------------------------------------------
@@ -177,25 +226,41 @@ set (HDF5_REFERENCE_TEST_FILES
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
set (dest "${HDF5_TEST_BINARY_DIR}/H5TEST/${h5_file}")
- #message (STATUS " Copying ${h5_file} to ${dest}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIBSH_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
if (HDF5_TEST_VFD)
foreach (vfdtest ${VFD_LIST})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
set (dest "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}")
- #message (STATUS " Copying ${h5_file} to ${dest}")
add_custom_command (
TARGET ${HDF5_TEST_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
)
+ if (BUILD_SHARED_LIBS)
+ set (dest "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}")
+ add_custom_command (
+ TARGET ${HDF5_TEST_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
+ )
+ endif (BUILD_SHARED_LIBS)
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
endforeach (vfdtest ${VFD_LIST})
endif (HDF5_TEST_VFD)
@@ -258,6 +323,38 @@ else (HDF5_ENABLE_USING_MEMCHECKER)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME H5TEST-shared-clear-testhdf5-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ coord.h5
+ dtypes10.h5
+ sys_file1
+ tattr.h5
+ tfile1.h5
+ tfile2.h5
+ tfile3.h5
+ tfile4.h5
+ tfile5.h5
+ tfile6.h5
+ tfile7.h5
+ th5o_file
+ th5s1.h5
+ tselect.h5
+ tsohm.h5
+ tsohm_dst.h5
+ tsohm_src.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-testhdf5 COMMAND $<TARGET_FILE:testhdf5-shared>)
+ set_tests_properties (H5TEST-shared-testhdf5 PROPERTIES
+ DEPENDS H5TEST-shared-clear-testhdf5-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ endif (BUILD_SHARED_LIBS)
endif (HDF5_ENABLE_USING_MEMCHECKER)
##############################################################################
@@ -355,6 +452,97 @@ set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800)
set_tests_properties (H5TEST-testmeta PROPERTIES TIMEOUT 1800)
set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800)
+if (BUILD_SHARED_LIBS)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5TEST-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ dt_arith1.h5
+ dt_arith2.h5
+ dtransform.h5
+ dtypes3.h5
+ dtypes4.h5
+ dtypes5.h5
+ efc0.h5
+ efc1.h5
+ efc2.h5
+ efc3.h5
+ efc4.h5
+ efc5.h5
+ extlinks16A00000.h5
+ extlinks16A00001.h5
+ extlinks16A00002.h5
+ extlinks16B-b.h5
+ extlinks16B-g.h5
+ extlinks16B-l.h5
+ extlinks16B-r.h5
+ extlinks16B-s.h5
+ extlinks19B00000.h5
+ extlinks19B00001.h5
+ extlinks19B00002.h5
+ extlinks19B00003.h5
+ extlinks19B00004.h5
+ extlinks19B00005.h5
+ extlinks19B00006.h5
+ extlinks19B00007.h5
+ extlinks19B00008.h5
+ extlinks19B00009.h5
+ extlinks19B00010.h5
+ extlinks19B00011.h5
+ extlinks19B00012.h5
+ extlinks19B00013.h5
+ extlinks19B00014.h5
+ extlinks19B00015.h5
+ extlinks19B00016.h5
+ extlinks19B00017.h5
+ extlinks19B00018.h5
+ extlinks19B00019.h5
+ extlinks19B00020.h5
+ extlinks19B00021.h5
+ extlinks19B00022.h5
+ extlinks19B00023.h5
+ extlinks19B00024.h5
+ extlinks19B00025.h5
+ extlinks19B00026.h5
+ extlinks19B00027.h5
+ extlinks19B00028.h5
+ fheap.h5
+ log_vfd_out.log
+ new_multi_file_v16-r.h5
+ new_multi_file_v16-s.h5
+ objcopy_ext.dat
+ testmeta.h5
+ tstint1.h5
+ tstint2.h5
+ unregister_filter_1.h5
+ unregister_filter_2.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+
+ foreach (test ${H5_TESTS})
+ if (${test} STREQUAL "big" AND CYGWIN)
+ add_test (
+ NAME H5TEST-shared-${test}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
+ )
+ else (${test} STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-shared-${test} COMMAND $<TARGET_FILE:${test}-shared>)
+ endif (${test} STREQUAL "big" AND CYGWIN)
+ set_tests_properties (H5TEST-shared-${test} PROPERTIES
+ DEPENDS H5TEST-shared-clear-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ endforeach (test ${H5_TESTS})
+
+ set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1)
+ set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800)
+ set_tests_properties (H5TEST-shared-testmeta PROPERTIES TIMEOUT 1800)
+ set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800)
+endif (BUILD_SHARED_LIBS)
+
##############################################################################
##############################################################################
### A D D I T I O N A L T E S T S ###
@@ -362,20 +550,22 @@ set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800)
##############################################################################
#-- Adding test for cache
-add_test (
- NAME H5TEST-clear-cache-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- cache_test.h5
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
-add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>)
-set_tests_properties (H5TEST-cache PROPERTIES
- DEPENDS H5TEST-clear-cache-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
+if (NOT CYGWIN)
+ add_test (
+ NAME H5TEST-clear-cache-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>)
+ set_tests_properties (H5TEST-cache PROPERTIES
+ DEPENDS H5TEST-clear-cache-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=2"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+endif (NOT CYGWIN)
#-- Adding test for cache_api
add_test (
@@ -521,31 +711,186 @@ add_test (
${HDF5_TEST_BINARY_DIR}/H5TEST
)
-##############################################################################
-### P L U G I N T E S T S
-##############################################################################
if (BUILD_SHARED_LIBS)
+ #-- Adding test for cache
+ if (NOT CYGWIN)
+ add_test (
+ NAME H5TEST-shared-clear-cache-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>)
+ set_tests_properties (H5TEST-shared-cache PROPERTIES
+ DEPENDS H5TEST-shared-clear-cache-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=2"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ endif (NOT CYGWIN)
+
+ #-- Adding test for cache_api
+ add_test (
+ NAME H5TEST-shared-clear-cache_api-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_api_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-cache_api COMMAND $<TARGET_FILE:cache_api-shared>)
+ set_tests_properties (H5TEST-shared-cache_api PROPERTIES
+ DEPENDS H5TEST-shared-clear-cache_api-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
- if (WIN32)
- set (CMAKE_SEP "\;")
- else (WIN32)
- set (CMAKE_SEP ":")
- endif (WIN32)
+ #-- Adding test for cache_tagging
+ add_test (
+ NAME H5TEST-shared-clear-cache_tagging-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tagging_test.h5
+ tagging_ext_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-cache_tagging COMMAND $<TARGET_FILE:cache_tagging-shared>)
+ set_tests_properties (H5TEST-shared-cache_tagging PROPERTIES
+ DEPENDS H5TEST-shared-clear-cache_tagging-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+
+ #-- Adding test for ttsafe
+ add_test (
+ NAME H5TEST-shared-clear-ttsafe-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ttsafe_error.h5
+ ttsafe_dcreate.h5
+ ttsafe_cancel.h5
+ ttsafe_acreate.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-ttsafe COMMAND $<TARGET_FILE:ttsafe-shared>)
+ set_tests_properties (H5TEST-shared-ttsafe PROPERTIES
+ DEPENDS H5TEST-shared-clear-ttsafe-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+
+ #-- Adding test for err_compat
+ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ add_test (
+ NAME H5TEST-shared-clear-err_compat-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ err_compat.txt
+ err_compat.txt.err
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-err_compat COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:err_compat-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_OUTPUT=err_compat.txt"
+ -D "TEST_REFERENCE=err_compat_1"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5TEST-shared-err_compat PROPERTIES
+ DEPENDS H5TEST-shared-clear-err_compat-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+
+ #-- Adding test for error_test
+ add_test (
+ NAME H5TEST-shared-clear-error_test-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ error_test.txt
+ error_test.txt.err
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:error_test-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_OUTPUT=error_test.txt"
+ -D "TEST_REFERENCE=error_test_1"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5TEST-shared-error_test PROPERTIES
+ DEPENDS H5TEST-shared-clear-error_test-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
- add_test (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
- set_tests_properties (H5PLUGIN-plugin PROPERTIES
- ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
+ #-- Adding test for links_env
+ add_test (
+ NAME H5TEST-shared-clear-links_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ links_env.txt
+ links_env.txt.err
+ extlinks_env0.h5
+ extlinks_env1.h5
+ tmp/extlinks_env1.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ add_test (NAME H5TEST-shared-links_env COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:links_env-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
+ -D "TEST_ENV_VALUE:STRING=.:tmp"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=links_env.txt"
+ -D "TEST_REFERENCE=links_env.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
-else (BUILD_SHARED_LIBS)
- message (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ set_tests_properties (H5TEST-shared-links_env PROPERTIES
+ DEPENDS H5TEST-shared-clear-links_env-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+
+ #-- Adding test for libinfo
add_test (
- NAME H5PLUGIN-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
+ NAME H5TEST-shared-testlibinfo
+ COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIBSH_TARGET}>" -P "${GREP_RUNNER}"
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
endif (BUILD_SHARED_LIBS)
##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+if (WIN32)
+ set (CMAKE_SEP "\;")
+else (WIN32)
+ set (CMAKE_SEP ":")
+endif (WIN32)
+
+add_test (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
+set_tests_properties (H5PLUGIN-plugin PROPERTIES
+ ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
+)
+
+##############################################################################
##############################################################################
### V F D T E S T S ###
##############################################################################
@@ -560,7 +905,7 @@ if (HDF5_TEST_VFD)
ohdr
stab
gheap
- cache
+# cache
cache_api
cache_tagging
pool
@@ -609,7 +954,7 @@ if (HDF5_TEST_VFD)
unregister
)
if (NOT CYGWIN)
- set (H5_VFD_TESTS ${H5_VFD_TESTS} big)
+ set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache)
endif (NOT CYGWIN)
MACRO (CHECK_VFD_TEST vfdtest vfdname resultcode)
@@ -623,7 +968,7 @@ if (HDF5_TEST_VFD)
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
@@ -631,11 +976,34 @@ if (HDF5_TEST_VFD)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif (BUILD_SHARED_LIBS)
else (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
add_test (
NAME VFD-${vfdname}-${vfdtest}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}"
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${test}-shared
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared"
+ )
+ endif (BUILD_SHARED_LIBS)
endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
add_test (
@@ -645,7 +1013,7 @@ if (HDF5_TEST_VFD)
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
@@ -653,6 +1021,23 @@ if (HDF5_TEST_VFD)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif (BUILD_SHARED_LIBS)
endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
add_test (
@@ -662,14 +1047,31 @@ if (HDF5_TEST_VFD)
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdtest}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif (BUILD_SHARED_LIBS)
endif (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
ENDMACRO (CHECK_VFD_TEST vfdtest vfdname resultcode)
@@ -679,42 +1081,82 @@ if (HDF5_TEST_VFD)
CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
else (WIN32)
add_test (
- NAME VFD-${vfdname}-${test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${test}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ NAME VFD-${vfdname}-${test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${test}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${test} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${test}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${test}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif (BUILD_SHARED_LIBS)
endif (WIN32)
endforeach (test ${H5_VFD_TESTS})
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
+ if (BUILD_SHARED_LIBS)
+ set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared)
+ set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10)
+ set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10)
+ endif (BUILD_SHARED_LIBS)
if (HDF5_TEST_FHEAP_VFD)
add_test (
- NAME VFD-${vfdname}-fheap
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-fheap"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ NAME VFD-${vfdname}-fheap
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-fheap"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
TIMEOUT 1800
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
+ if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME VFD-${vfdname}-fheap-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-fheap-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
+ TIMEOUT 1800
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif (BUILD_SHARED_LIBS)
endif (HDF5_TEST_FHEAP_VFD)
ENDMACRO (ADD_VFD_TEST)
@@ -731,7 +1173,7 @@ endif (HDF5_TEST_VFD)
##############################################################################
##############################################################################
-if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+if (HDF5_BUILD_GENERATORS)
MACRO (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
TARGET_NAMING (${genfile} STATIC)
@@ -767,4 +1209,4 @@ if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_H5_GENERATOR (${gen})
endforeach (gen ${H5_GENERATORS})
-endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+endif (HDF5_BUILD_GENERATORS)
diff --git a/test/mf.c b/test/mf.c
index 0c45c35..2989174 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -608,12 +608,12 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* File size */
- H5FD_mem_t type;
+ H5FD_mem_t type;
haddr_t addr;
- htri_t extended;
- haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF;
- hsize_t ma_size=0, new_ma_size=0;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
+ htri_t was_extended;
+ haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF;
+ hsize_t ma_size=0, new_ma_size=0;
+ hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
TESTING("H5MF_try_extend() of file allocation: test 1");
@@ -685,9 +685,9 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* should succeed */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
- if(extended <= 0)
+ if(was_extended <= 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -744,10 +744,10 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if(new_ma_addr != ma_addr)
TEST_ERROR
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50));
/* should not succeed */
- if(extended > 0)
+ if(was_extended > 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -1454,7 +1454,7 @@ test_mf_fs_extend(hid_t fapl)
frspace_state_t state; /* State of free space*/
H5MF_sect_ud_t udata;
H5FS_section_info_t *node;
- htri_t extended;
+ htri_t was_extended;
TESTING("H5MF_try_extend() of free-space manager:test 1");
@@ -1548,10 +1548,10 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
/* should succeed */
- if(extended <= 0)
+ if(was_extended <= 0)
TEST_ERROR
/* Section B is removed from free-space manager */
@@ -1666,10 +1666,10 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10));
/* Should not be able to extend the allocated block */
- if(extended)
+ if(was_extended)
TEST_ERROR
/* free-space info should remain the same */
@@ -1779,10 +1779,10 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40));
/* Should succeed in extending the allocated block */
- if(extended <=0)
+ if(was_extended <=0)
TEST_ERROR
/* Should have 1 section of size=10 left in free-space manager */
@@ -1892,10 +1892,10 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50);
/* Should not succeed in extending the allocated block */
- if(extended)
+ if(was_extended)
TEST_ERROR
/* Free-space info should be the same */
@@ -3241,7 +3241,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
haddr_t new_addr, addr, saddr;
haddr_t ma_addr=HADDR_UNDEF, new_ma_addr=HADDR_UNDEF, sdata_addr=HADDR_UNDEF;
hsize_t ma_size=0, new_ma_size=0, sdata_size=0;
- htri_t extended;
+ htri_t was_extended;
hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1");
@@ -3286,10 +3286,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
new_addr = addr - 10;
/* Try to extend the block by an amount < (% * aggr->alloc_size) */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
/* should succeed */
- if(!extended)
+ if(!was_extended)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3302,10 +3302,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE50);
/* Try to extend the block by an amount > (% * aggr->alloc_size) but amount < aggr->alloc_size */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700));
/* should succeed */
- if(!extended)
+ if(!was_extended)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3318,10 +3318,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE700);
/* Try to extend the block by an amount > (% * aggr->alloc_size) but amount > aggr->alloc_size */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058));
/* should succeed */
- if(!extended)
+ if(!was_extended)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3384,9 +3384,9 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
new_addr = addr - 10;
/* should be able to fulfill request from the aggreqator itself */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
- if(!extended)
+ if(!was_extended)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3454,9 +3454,9 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
new_addr = addr - 10;
/* unable to fulfill request from the aggreqator itself */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
- if(extended)
+ if(was_extended)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3772,7 +3772,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t addr1, addr2;
haddr_t ma_addr=HADDR_UNDEF;
hsize_t ma_size=0;
- htri_t extended;
+ htri_t was_extended;
frspace_state_t state;
hsize_t alignment=0, mis_align=0, tmp=0, accum=0;
hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */
@@ -3978,9 +3978,9 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
FAIL_STACK_ERROR
/* try to extend the block */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30);
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30);
- if (extended <=0) TEST_ERROR
+ if (was_extended <=0) TEST_ERROR
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -4052,7 +4052,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
haddr_t addr;
frspace_state_t state;
H5MF_sect_ud_t udata;
- htri_t extended;
+ htri_t was_extended;
hsize_t alignment=0, tmp=0, mis_align=0;
hbool_t have_alloc_vfd; /* Whether VFD used has an 'alloc' callback */
@@ -4197,9 +4197,9 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
/* try to extend the block */
- extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200);
+ was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200);
- if (extended <=0) TEST_ERROR
+ if (was_extended <=0) TEST_ERROR
/* space should be decreased by 200, # of sections remain the same */
state.tot_space -= TEST_BLOCK_SIZE200;
diff --git a/test/trefer.c b/test/trefer.c
index 203b602..df4ea76 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -515,7 +515,7 @@ test_reference_region(void)
hsize_t high[SPACE2_RANK]; /* Selection bounds */
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
- hdset_reg_ref_t nvrbuf[3]={{0},{101},{1000000000}}; /* buffer with non-valid refs */
+ hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
*drbuf; /* Buffer for reading numeric data from disk */
uint8_t *tu8; /* Temporary pointer to uint8 data */
@@ -742,7 +742,7 @@ test_reference_region(void)
VERIFY(ret, 36, "H5Sget_select_npoints");
ret = (int)H5Sget_select_hyper_nblocks(sid2);
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
- coords = HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t) * 2); /* allocate space for the hyperslab blocks */
+ coords = (hsize_t *)HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t) * 2); /* allocate space for the hyperslab blocks */
ret = H5Sget_select_hyper_blocklist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
VERIFY(coords[0], 2, "Hyperslab Coordinates");
@@ -770,7 +770,7 @@ test_reference_region(void)
VERIFY(ret, 10, "H5Sget_select_npoints");
ret = (int)H5Sget_select_elem_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
- coords = HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t)); /* allocate space for the element points */
+ coords = (hsize_t *)HDmalloc(ret * SPACE2_RANK * sizeof(hsize_t)); /* allocate space for the element points */
ret = H5Sget_select_elem_pointlist(sid2, (hsize_t)0, (hsize_t)ret, coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
VERIFY(coords[0], coord1[0][0], "Element Coordinates");