summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-08-05 21:01:07 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-08-05 21:01:07 (GMT)
commit9e2434625dde11a19b46a5154477247266792219 (patch)
tree7e7b94935a7acdf8024ec464218c564dccf52963 /test
parent0b4b73331d2cd4d6d3433e8bc5c45011f75d6fd3 (diff)
downloadhdf5-9e2434625dde11a19b46a5154477247266792219.zip
hdf5-9e2434625dde11a19b46a5154477247266792219.tar.gz
hdf5-9e2434625dde11a19b46a5154477247266792219.tar.bz2
[svn-r27469] Merge from trunk with dual-binary CMake code.
Tested: local linux with CMake
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt156
-rw-r--r--test/CMakeTests.cmake598
-rw-r--r--test/Makefile.in5
-rw-r--r--test/dt_arith.c56
-rw-r--r--test/mf.c70
-rw-r--r--test/trefer.c6
6 files changed, 742 insertions, 149 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 651e4eb..c94b880 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,12 +134,11 @@ 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}>"
)
endforeach (test_lib ${TEST2_PLUGIN_LIBS})
-endif (BUILD_SHARED_LIBS)
set (testhdf5_SRCS
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
@@ -153,17 +170,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
@@ -236,24 +267,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
@@ -263,37 +315,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\")
@@ -312,6 +398,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..03ce5e3 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)
@@ -204,7 +269,7 @@ endif (HDF5_TEST_VFD)
add_test (
NAME H5TEST-clear-testhdf5-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
coord.h5
dtypes10.h5
sys_file1
@@ -258,8 +323,40 @@ 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)
-
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -270,7 +367,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5TEST-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
dt_arith1.h5
dt_arith2.h5
dtransform.h5
@@ -344,7 +441,7 @@ foreach (test ${H5_TESTS})
add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
endif (${test} STREQUAL "big" AND CYGWIN)
set_tests_properties (H5TEST-${test} PROPERTIES
- DEPENDS H5TEST-clear-objects
+ DEPENDS H5TEST-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -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,33 +550,35 @@ 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"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+endif (NOT CYGWIN)
#-- Adding test for cache_api
add_test (
NAME H5TEST-clear-cache_api-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
cache_api_test.h5
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
add_test (NAME H5TEST-cache_api COMMAND $<TARGET_FILE:cache_api>)
set_tests_properties (H5TEST-cache_api PROPERTIES
- DEPENDS H5TEST-clear-cache_api-objects
+ DEPENDS H5TEST-clear-cache_api-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -397,7 +587,7 @@ set_tests_properties (H5TEST-cache_api PROPERTIES
add_test (
NAME H5TEST-clear-cache_tagging-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
tagging_test.h5
tagging_ext_test.h5
WORKING_DIRECTORY
@@ -414,7 +604,7 @@ set_tests_properties (H5TEST-cache_tagging PROPERTIES
add_test (
NAME H5TEST-clear-ttsafe-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
ttsafe_error.h5
ttsafe_dcreate.h5
ttsafe_cancel.h5
@@ -434,7 +624,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_test (
NAME H5TEST-clear-err_compat-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
err_compat.txt
err_compat.txt.err
WORKING_DIRECTORY
@@ -461,7 +651,7 @@ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_test (
NAME H5TEST-clear-error_test-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
error_test.txt
error_test.txt.err
WORKING_DIRECTORY
@@ -477,7 +667,7 @@ add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
-set_tests_properties (H5TEST-error_test PROPERTIES
+set_tests_properties (H5TEST-error_test PROPERTIES
DEPENDS H5TEST-clear-error_test-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
@@ -489,7 +679,7 @@ add_test (
COMMAND ${CMAKE_COMMAND}
-E remove
links_env.txt
- links_env.txt.err
+ links_env.txt.err
extlinks_env0.h5
extlinks_env1.h5
tmp/extlinks_env1.h5
@@ -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"
+ 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
+ )
- 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 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
)
-else (BUILD_SHARED_LIBS)
- message (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+
+ #-- 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 H5PLUGIN-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
+ 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
+ )
+
+ #-- 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"
+ )
+ 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 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)
@@ -617,13 +962,13 @@ if (HDF5_TEST_VFD)
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}
+ NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-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,21 +976,44 @@ 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 (
- NAME VFD-${vfdname}-${vfdtest}
+ NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-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,16 +1021,33 @@ 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 (
- NAME VFD-${vfdname}-${vfdtest}
+ NAME VFD-${vfdname}-${vfdtest}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
-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"
)
@@ -670,6 +1055,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}-${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"
+ 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,45 +1081,85 @@ 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}"
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"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif (BUILD_SHARED_LIBS)
endif (HDF5_TEST_FHEAP_VFD)
ENDMACRO (ADD_VFD_TEST)
-
+
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
@@ -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/Makefile.in b/test/Makefile.in
index d3f1b86..32f757c 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -116,7 +116,10 @@ TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT)
subdir = test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 8ededc7..b3f5cad 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -5032,8 +5032,32 @@ run_int_fp_conv(const char *name)
#endif
#endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
+#if H5_LLONG_TO_LDOUBLE_CORRECT
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE);
+#else /* H5_LLONG_TO_LDOUBLE_CORRECT */
+ {
+ char str[256]; /*hello string */
+
+ HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions",
+ name, "long long", "long double");
+ printf("%-70s", str);
+ SKIPPED();
+ HDputs(" Test skipped due to compiler error in handling conversion.");
+ }
+#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
+#if H5_LLONG_TO_LDOUBLE_CORRECT
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE);
+#else /* H5_LLONG_TO_LDOUBLE_CORRECT */
+ {
+ char str[256]; /*hello string */
+
+ HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions",
+ name, "unsigned long long", "long double");
+ printf("%-70s", str);
+ SKIPPED();
+ HDputs(" Test skipped due to compiler not handling conversion.");
+ }
+#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#endif
#endif
@@ -5134,8 +5158,40 @@ run_fp_int_conv(const char *name)
#endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0 */
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0
+#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG);
+#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
+ {
+ char str[256]; /*string */
+
+ HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions",
+ name, "long double", "long long");
+ printf("%-70s", str);
+ SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE!=0
+ HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disabled long double.");
+#endif
+ }
+#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
+#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE)
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG);
+#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
+ {
+ char str[256]; /*string */
+
+ HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions",
+ name, "long double", "unsigned long long");
+ printf("%-70s", str);
+ SKIPPED();
+#if H5_SIZEOF_LONG_DOUBLE!=0
+ HDputs(" Test skipped due to hardware conversion error.");
+#else
+ HDputs(" Test skipped due to disabled long double.");
+#endif
+ }
+#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/
#endif
#endif
#ifndef H5_VMS
diff --git a/test/mf.c b/test/mf.c
index 93667de..67ebc4e 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");