summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt214
-rw-r--r--test/CMakeTests.cmake385
-rw-r--r--test/CMakeVFDTests.cmake200
3 files changed, 190 insertions, 609 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 42fc3a6..5b34ec5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,29 +23,32 @@ set (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/swmr_common.h
)
-add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
-target_include_directories(${HDF5_TEST_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC)
-target_link_libraries (${HDF5_TEST_LIB_TARGET}
- PUBLIC ${LINK_LIBS} ${HDF5_LIB_TARGET}
- PRIVATE $<$<PLATFORM_ID:Windows>:ws2_32.lib>
-)
-if (MINGW)
- target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib")
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
+ target_include_directories (${HDF5_TEST_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_TEST_LIB_TARGET}
+ PUBLIC ${LINK_LIBS} ${HDF5_LIB_TARGET}
+ PRIVATE $<$<PLATFORM_ID:Windows>:ws2_32.lib>
+ )
+ if (MINGW)
+ target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib")
+ endif ()
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test)
endif ()
-H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC 0)
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
- target_include_directories(${HDF5_TEST_LIBSH_TARGET}
+ target_include_directories (${HDF5_TEST_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
target_compile_definitions(${HDF5_TEST_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
)
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET}
@@ -85,9 +88,9 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
- target_include_directories(${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED)
- target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
+ target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
@@ -110,9 +113,9 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
- target_include_directories(${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${HDF5_TEST_PLUGIN_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED)
- target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
+ target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
@@ -241,17 +244,15 @@ set (H5_TESTS
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- target_include_directories(${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (${file} STATIC)
- target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
- set_target_properties (${file} PROPERTIES FOLDER test)
- if (BUILD_SHARED_LIBS)
- add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- target_include_directories(${file}-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (${file}-shared SHARED)
- target_link_libraries (${file}-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET})
- set_target_properties (${file}-shared PROPERTIES FOLDER test)
+ target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (${file} SHARED)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
+ set_target_properties (${file} PROPERTIES FOLDER test)
endmacro ()
set (H5_TESTS_MULTIPLE
@@ -273,61 +274,58 @@ endforeach ()
######### Also special handling of link libs #############
#-- Adding test for direct_chunk
add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
-target_include_directories(direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (direct_chunk STATIC)
-target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
-set_target_properties (direct_chunk PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (direct_chunk-shared ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
- target_include_directories(direct_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (direct_chunk-shared SHARED)
- target_link_libraries (direct_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${LINK_COMP_LIBS})
- set_target_properties (direct_chunk-shared PROPERTIES FOLDER test)
+target_include_directories (direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (direct_chunk STATIC)
+ target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
+else ()
+ TARGET_C_PROPERTIES (direct_chunk SHARED)
+ target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${LINK_COMP_LIBS})
endif ()
+set_target_properties (direct_chunk PROPERTIES FOLDER test)
######### Special handling for multiple sources #############
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
-target_include_directories(testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (testhdf5 STATIC)
-target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIB_TARGET})
-set_target_properties (testhdf5 PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (testhdf5-shared ${testhdf5_SOURCES})
- target_include_directories(testhdf5-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (testhdf5-shared SHARED)
- target_link_libraries (testhdf5-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET})
- set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
+target_include_directories (testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (testhdf5 STATIC)
+ target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (testhdf5 SHARED)
+ target_link_libraries (testhdf5 PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
+set_target_properties (testhdf5 PROPERTIES FOLDER test)
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
-target_include_directories(cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (cache_image STATIC)
-target_link_libraries (cache_image PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (cache_image PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (cache_image-shared ${cache_image_SOURCES})
- target_include_directories(cache_image-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (cache_image-shared SHARED)
- target_link_libraries (cache_image-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (cache_image-shared PROPERTIES FOLDER test)
+target_include_directories (cache_image PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (cache_image STATIC)
+ target_link_libraries (cache_image PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (cache_image SHARED)
+ target_link_libraries (cache_image PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
+set_target_properties (cache_image PROPERTIES FOLDER test)
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
-target_include_directories(ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (ttsafe STATIC)
-target_link_libraries (ttsafe PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (ttsafe PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (ttsafe-shared ${ttsafe_SOURCES})
- target_include_directories(ttsafe-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (ttsafe-shared SHARED)
- target_link_libraries (ttsafe-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
+target_include_directories (ttsafe PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (ttsafe STATIC)
+ target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIB_TARGET})
+ if (NOT WIN32)
+ target_link_libraries (ttsafe
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ )
+ endif ()
+else ()
+ TARGET_C_PROPERTIES (ttsafe SHARED)
+ target_link_libraries (ttsafe PRIVATE ${HDF5_TEST_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>)
endif ()
+set_target_properties (ttsafe PROPERTIES FOLDER test)
##############################################################################
### A D D I T I O N A L T E S T S ###
@@ -397,31 +395,27 @@ endforeach ()
# This has to be copied to the test directory for execve() to find it
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
-target_include_directories(accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (accum_swmr_reader STATIC)
-target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+target_include_directories (accum_swmr_reader PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (accum_swmr_reader STATIC)
+ target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (accum_swmr_reader SHARED)
+ target_link_libraries (accum_swmr_reader PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+endif ()
set_target_properties (accum_swmr_reader PROPERTIES FOLDER test)
#-- Set accum dependencies
set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader)
-if (BUILD_SHARED_LIBS)
- set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader)
-endif ()
##############################################################################
### P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
- target_include_directories(filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (filter_plugin SHARED)
- target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET})
- set_target_properties (filter_plugin PROPERTIES FOLDER test)
-else ()
- add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
- target_include_directories(filter_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (filter_plugin STATIC)
- target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET})
+ target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
endif ()
@@ -430,44 +424,38 @@ endif ()
##############################################################################
set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
-target_include_directories(use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (use_append_chunk STATIC)
-target_link_libraries (use_append_chunk PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (use_append_chunk PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (use_append_chunk-shared ${use_append_chunk_SOURCES})
- target_include_directories(use_append_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (use_append_chunk-shared SHARED)
- target_link_libraries (use_append_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test)
+target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (use_append_chunk STATIC)
+ target_link_libraries (use_append_chunk PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (use_append_chunk SHARED)
+ target_link_libraries (use_append_chunk PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
+set_target_properties (use_append_chunk PROPERTIES FOLDER test)
set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
-target_include_directories(use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (use_append_mchunks STATIC)
-target_link_libraries (use_append_mchunks PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (use_append_mchunks PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (use_append_mchunks-shared ${use_append_mchunks_SOURCES})
- target_include_directories(use_append_mchunks-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED)
- target_link_libraries (use_append_mchunks-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test)
+target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (use_append_mchunks STATIC)
+ target_link_libraries (use_append_mchunks PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (use_append_mchunks SHARED)
+ target_link_libraries (use_append_mchunks PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
+set_target_properties (use_append_mchunks PROPERTIES FOLDER test)
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
-target_include_directories(use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC)
-target_link_libraries (use_disable_mdc_flushes PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (use_disable_mdc_flushes-shared ${use_disable_mdc_flushes_SOURCES})
- target_include_directories(use_disable_mdc_flushes-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED)
- target_link_libraries (use_disable_mdc_flushes-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test)
+target_include_directories (use_disable_mdc_flushes PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC)
+ target_link_libraries (use_disable_mdc_flushes PRIVATE ${HDF5_TEST_LIB_TARGET})
+else ()
+ TARGET_C_PROPERTIES (use_disable_mdc_flushes SHARED)
+ target_link_libraries (use_disable_mdc_flushes PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
+set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
include (CMakeTests.cmake)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index eccf9d4..9a5791a 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -20,11 +20,6 @@
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 ()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
@@ -39,20 +34,9 @@ add_custom_command (
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "$<TARGET_FILE:accum_swmr_reader>" "${PROJECT_BINARY_DIR}/H5TEST/accum_swmr_reader"
)
-if (BUILD_SHARED_LIBS)
- add_custom_command (
- TARGET accum_swmr_reader
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different "$<TARGET_FILE:accum_swmr_reader>" "${PROJECT_BINARY_DIR}/H5TEST-shared/accum_swmr_reader"
- )
-endif ()
foreach (h5_tfile ${HDF5_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST/${h5_tfile}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files")
- endif ()
endforeach ()
# --------------------------------------------------------------------
@@ -68,9 +52,6 @@ set (HDF5_REFERENCE_FILES
foreach (ref_file ${HDF5_REFERENCE_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST/${ref_file}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}" "HDF5_TEST_LIBSH_files")
- endif ()
endforeach ()
# --------------------------------------------------------------------
@@ -130,10 +111,6 @@ set (HDF5_REFERENCE_PLIST_FILES
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/${plistfile}" "HDF5_TEST_LIB_files")
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST/testfiles/plist_files/def_${plistfile}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files/${plistfile}" "HDF5_TEST_LIBSH_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files/def_${plistfile}" "HDF5_TEST_LIBSH_files")
- endif ()
endforeach ()
# --------------------------------------------------------------------
@@ -194,38 +171,35 @@ set (HDF5_REFERENCE_TEST_FILES
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST/${h5_file}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}" "HDF5_TEST_LIBSH_files")
- endif ()
endforeach ()
add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list})
-if (BUILD_SHARED_LIBS)
- add_custom_target(HDF5_TEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_TEST_LIBSH tests" DEPENDS ${HDF5_TEST_LIBSH_files_list})
-endif ()
+
+set (testhdf5_CLEANFILES
+ coord.h5
+ dtypes10.h5
+ sys_file1
+ tattr.h5
+ tfile1.h5
+ tfile2.h5
+ tfile3.h5
+ tfile4.h5
+ tfile5.h5
+ tfile6.h5
+ tfile7.h5
+ tfilespace.h5
+ th5o_file
+ th5s1.h5
+ tselect.h5
+ tsohm.h5
+ tsohm_dst.h5
+ tsohm_src.h5
+)
# Remove any output file left over from previous test run
add_test (NAME H5TEST-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
- tfilespace.h5
- th5o_file
- th5s1.h5
- tselect.h5
- tsohm.h5
- tsohm_dst.h5
- tsohm_src.h5
+ -E remove ${testhdf5_CLEANFILES}
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -255,59 +229,6 @@ set_tests_properties (H5TEST-testhdf5-select PROPERTIES
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
-if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- 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
- tfilespace.h5
- th5o_file
- th5s1.h5
- tselect.h5
- tsohm.h5
- tsohm_dst.h5
- tsohm_src.h5
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- set_tests_properties (H5TEST-shared-clear-testhdf5-objects PROPERTIES FIXTURES_SETUP shared_clear_testhdf5)
- add_test (NAME H5TEST-shared-testhdf5-base COMMAND $<TARGET_FILE:testhdf5-shared> -x heap -x file -x select)
- set_tests_properties (H5TEST-shared-testhdf5-base PROPERTIES
- FIXTURES_REQUIRED shared_clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- add_test (NAME H5TEST-shared-testhdf5-heap COMMAND $<TARGET_FILE:testhdf5-shared> -o heap)
- set_tests_properties (H5TEST-shared-testhdf5-heap PROPERTIES
- FIXTURES_REQUIRED shared_clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- add_test (NAME H5TEST-shared-testhdf5-file COMMAND $<TARGET_FILE:testhdf5-shared> -o file)
- set_tests_properties (H5TEST-shared-testhdf5-file PROPERTIES
- FIXTURES_REQUIRED shared_clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- add_test (NAME H5TEST-shared-testhdf5-select COMMAND $<TARGET_FILE:testhdf5-shared> -o select)
- set_tests_properties (H5TEST-shared-testhdf5-select PROPERTIES
- FIXTURES_REQUIRED shared_clear_testhdf5
- ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- endif ()
-endif ()
##############################################################################
##############################################################################
@@ -565,6 +486,7 @@ foreach (h5_test ${H5_TESTS})
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=${h5_test}.txt"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
@@ -584,49 +506,6 @@ set_tests_properties (H5TEST-big PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
set_tests_properties (H5TEST-btree2 PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
-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
- ${test_CLEANFILES}
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- set_tests_properties (H5TEST-shared-clear-objects PROPERTIES FIXTURES_SETUP shared_clear_objects)
-
- foreach (h5_test ${H5_TESTS})
- if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
- if ("${h5_test}" STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-shared-${h5_test}
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
- )
- else ()
- add_test (NAME H5TEST-shared-${h5_test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${h5_test}.txt"
- #-D "TEST_REFERENCE=${test}.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (H5TEST-shared-${h5_test} PROPERTIES
- FIXTURES_REQUIRED shared_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- endif ()
- endforeach ()
-
- set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
- set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
- set_tests_properties (H5TEST-shared-btree2 PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
- set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
-endif ()
-
#-- Adding test for cache
if (NOT CYGWIN)
add_test (NAME H5TEST-clear-cache-objects
@@ -660,56 +539,22 @@ if (NOT CYGWIN)
endif ()
if (TEST_CACHE_IMAGE)
-#-- Adding test for cache_image
-add_test (
- NAME H5TEST-clear-cache_image-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- cache_image_test.h5
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
-set_tests_properties (H5TEST-clear-cache_image-objects PROPERTIES FIXTURES_SETUP cache_image_clear_objects)
-add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
-set_tests_properties (H5TEST-cache_image PROPERTIES
- FIXTURES_REQUIRED cache_image_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
-endif ()
-
-if (BUILD_SHARED_LIBS)
- #-- Adding test for cache
- if (NOT CYGWIN AND NOT WIN32)
- add_test (NAME H5TEST-shared-clear-cache-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- cache_test.h5
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- set_tests_properties (H5TEST-clear-objects PROPERTIES FIXTURES_SETUP shared_cache_clear_objects)
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>)
- else ()
- add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cache-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=cache-shared.txt"
- #-D "TEST_REFERENCE=cache-shared.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (H5TEST-shared-cache PROPERTIES
- FIXTURES_REQUIRED shared_cache_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
- endif ()
+ #-- Adding test for cache_image
+ add_test (
+ NAME H5TEST-clear-cache_image-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_image_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+ set_tests_properties (H5TEST-clear-cache_image-objects PROPERTIES FIXTURES_SETUP cache_image_clear_objects)
+ add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
+ set_tests_properties (H5TEST-cache_image PROPERTIES
+ FIXTURES_REQUIRED cache_image_clear_objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
endif ()
#-- Adding test for flush1/2
@@ -777,7 +622,6 @@ set_tests_properties (H5TEST-tcheck_version-release PROPERTIES
WILL_FAIL "true"
)
-
##############################################################################
##############################################################################
### A D D I T I O N A L T E S T S ###
@@ -921,130 +765,38 @@ add_test (NAME H5TEST-clear-links_env-objects
${HDF5_TEST_BINARY_DIR}/H5TEST
)
set_tests_properties (H5TEST-clear-links_env-objects PROPERTIES FIXTURES_SETUP links_env_clear_objects)
-add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
- -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"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
-)
-set_tests_properties (H5TEST-links_env PROPERTIES
- FIXTURES_REQUIRED links_env_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
-
-#-- Adding test for libinfo
-add_test (NAME H5TEST-testlibinfo
- COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}"
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
-
-if (BUILD_SHARED_LIBS)
- #-- 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
- )
- set_tests_properties (H5TEST-shared-clear-err_compat-objects PROPERTIES FIXTURES_SETUP shared_err_compat_clear_objects)
- 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 "ERROR_APPEND=1"
- -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
- FIXTURES_REQUIRED shared_err_compat_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- endif ()
-
- #-- 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
- )
- set_tests_properties (H5TEST-shared-clear-error_test-objects PROPERTIES FIXTURES_SETUP shared_error_test_clear_objects)
- if (HDF5_USE_16_API_DEFAULT)
- add_test (
- NAME H5TEST-shared-error_test
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP $<TARGET_FILE:error_test-shared>"
- )
- set_property(TEST H5TEST-shared-error_test PROPERTY DISABLED)
- else ()
- 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 "ERROR_APPEND=1"
- -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
- FIXTURES_REQUIRED shared_error_test_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- endif ()
-
- #-- 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
- )
- set_tests_properties (H5TEST-shared-clear-links_env-objects PROPERTIES FIXTURES_SETUP shared_links_env_clear_objects)
- add_test (NAME H5TEST-shared-links_env COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:links_env-shared>"
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5TEST-links_env COMMAND $<TARGET_FILE:links_env>)
+else ()
+ add_test (NAME H5TEST-links_env COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
-D "TEST_ARGS:STRING="
- -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
- -D "TEST_ENV_VALUE:STRING=.:tmp"
+ #-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"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5TEST-shared-links_env PROPERTIES
- FIXTURES_REQUIRED shared_links_env_clear_objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
+endif ()
+set_tests_properties (H5TEST-links_env PROPERTIES
+ FIXTURES_REQUIRED links_env_clear_objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_EXT_PREFIX=.:tmp"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+if (NOT BUILD_SHARED_LIBS)
#-- Adding test for libinfo
- add_test (NAME H5TEST-shared-testlibinfo
+ add_test (NAME H5TEST-testlibinfo
+ COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+else ()
+ #-- Adding test for libinfo
+ add_test (NAME H5TEST-testlibinfo
COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIBSH_TARGET}>" -P "${GREP_RUNNER}"
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
@@ -1094,9 +846,6 @@ if (ENABLE_EXTENDED_TESTS)
#-- Adding test for flushrefresh
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
- if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/flushrefresh_test")
- endif ()
find_package (Perl)
if (PERL_FOUND)
add_test (NAME H5TEST-clear-testflushrefresh-objects
@@ -1127,10 +876,10 @@ if (ENABLE_EXTENDED_TESTS)
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST/flushrefresh_test
)
- else ()
- message (STATUS "Cannot execute TEST flushrefresh - perl not found")
endif ()
-endif()
+else ()
+ message (STATUS "Cannot execute TEST flushrefresh - perl not found")
+endif ()
##############################################################################
##############################################################################
@@ -1148,10 +897,10 @@ endif ()
##############################################################################
##############################################################################
-if (HDF5_BUILD_GENERATORS)
+if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
- target_include_directories(${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_include_directories (${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${genfile} STATIC)
target_link_libraries (${genfile} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 64ccacd..5f02c9f 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -34,37 +34,23 @@ foreach (vfdtest ${VFD_LIST})
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files")
- if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared")
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles")
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files")
- endif ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (h5_tfile ${HDF5_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_VFDTEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_VFDTEST_LIBSH_files")
- endif ()
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (ref_file ${HDF5_REFERENCE_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_VFDTEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_VFDTEST_LIBSH_files")
- endif ()
endforeach ()
endforeach ()
foreach (vfdtest ${VFD_LIST})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_VFDTEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_VFDTEST_LIBSH_files")
- endif ()
endforeach ()
endforeach ()
@@ -72,17 +58,10 @@ foreach (vfdtest ${VFD_LIST})
foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files")
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIBSH_files")
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIBSH_files")
- endif ()
endforeach ()
endforeach ()
add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIB tests" DEPENDS ${HDF5_VFDTEST_LIB_files_list})
-if (BUILD_SHARED_LIBS)
- add_custom_target(HDF5_VFDTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIBSH tests" DEPENDS ${HDF5_VFDTEST_LIBSH_files_list})
-endif ()
##############################################################################
##############################################################################
@@ -134,39 +113,10 @@ endif ()
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-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
- )
- 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.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
else ()
add_test (NAME VFD-${vfdname}-${vfdtest}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}"
)
- if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-${vfdtest}-shared
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared"
- )
- endif ()
endif ()
else ()
add_test (
@@ -191,30 +141,6 @@ endif ()
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-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
- )
- 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.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
endif ()
else ()
add_test (
@@ -239,80 +165,32 @@ endif ()
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
- if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache")
- add_test (
- NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
- )
- 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.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
endif ()
endmacro ()
macro (DO_VFD_TEST vfdtest vfdname resultcode)
- add_test (
- NAME VFD-${vfdname}-${vfdtest}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${vfdname}/${vfdname}-${vfdtest}.out
- ${vfdname}/${vfdname}-${vfdtest}.out.err
- )
- add_test (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=${vfdname}-${vfdtest}.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
- 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-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out
- ${vfdname}-shared/${vfdname}-${vfdtest}-shared.out.err
- )
- 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.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- DEPENDS VFD-${vfdname}-${vfdtest}-shared-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
+ add_test (
+ NAME VFD-${vfdname}-${vfdtest}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${vfdname}/${vfdname}-${vfdtest}.out
+ ${vfdname}/${vfdname}-${vfdtest}.out.err
+ )
+ add_test (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=${vfdname}-${vfdtest}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ DEPENDS VFD-${vfdname}-${vfdtest}-clear-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
@@ -332,15 +210,6 @@ endif ()
if (NOT CYGWIN)
set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
endif ()
- 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)
- set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
- if (NOT CYGWIN AND NOT WIN32)
- set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT})
- endif ()
- endif ()
if (HDF5_TEST_FHEAP_VFD)
add_test (
NAME VFD-${vfdname}-fheap-clear-objects
@@ -365,31 +234,6 @@ endif ()
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
- if (BUILD_SHARED_LIBS)
- add_test (
- NAME VFD-${vfdname}-fheap-shared-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${vfdname}-shared/${vfdname}-fheap-shared.out
- ${vfdname}-shared/${vfdname}-fheap-shared.out.err
- )
- 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.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
- DEPENDS VFD-${vfdname}-fheap-shared-clear-objects
- TIMEOUT ${CTEST_VERY_LONG_TIMEOUT}
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
endif ()
endmacro ()