Incr CMake min, add missing test, rework test CMake script

This commit is contained in:
Allen Byrne
2018-02-27 16:39:10 -06:00
parent 6ad2ea374b
commit d4e7beb9ee
77 changed files with 638 additions and 669 deletions

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5 C CXX)
#-----------------------------------------------------------------------------

View File

@@ -3175,6 +3175,7 @@
./src/CMakeLists.txt
./test/CMakeLists.txt
./test/CMakeTests.cmake
./test/CMakeVFDTests.cmake
./testpar/CMakeLists.txt
./testpar/CMakeTests.cmake
./tools/CMakeLists.txt

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_CPP_EXAMPLES)
# --------------------------------------------------------------------

View File

@@ -51,7 +51,7 @@
endif ()
set (last_test "CPP_ex_${example}")
endforeach ()
#the following dependicies are handled by the order of the files
#the following dependencies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
@@ -91,7 +91,7 @@
endif ()
set (last_test "CPP_ex_${example}")
endforeach ()
#the following dependicies are handled by the order of the files
#the following dependencies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_CPP_SRC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_CPP_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed

View File

@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
########################################################
# For any comments please contact cdashhelp@hdfgroup.org
#

View File

@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:
@@ -66,7 +66,7 @@ endif()
if(NOT DEFINED CTEST_BUILD_NAME)
set(CTEST_BUILD_NAME "examples")
endif()
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
@@ -88,9 +88,9 @@ else()
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif()
if(${CDASH_LOCAL})
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON")
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON")
endif()
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
###############################################################################################################
# For any comments please contact cdashhelp@hdfgroup.org

View File

@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:

View File

@@ -9,7 +9,7 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org

View File

@@ -15,7 +15,7 @@
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ###
#############################################################################################
cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
############################################################################
# Usage:
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_EXAMPLES)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_F90 C CXX Fortran)
if (H5_HAVE_PARALLEL)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_CPP)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_CPP_EXAMPLES)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_CPP_SRC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_CPP_TEST)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_EXAMPLES )
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_F90 C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_SRC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_TOOLS C CXX)
add_subdirectory (gif2h5)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_TOOLS_GIF2H5)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_HL_TOOLS_H5WATCH)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT ( HDF5_JAVA C Java )
set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}")

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDFJAVA_EXAMPLES)
add_subdirectory (datasets)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDFJAVA_EXAMPLES_DATASETS Java)
set (CMAKE_VERBOSE_MAKEFILE 1)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDFJAVA_EXAMPLES_DATATYPES Java)
set (CMAKE_VERBOSE_MAKEFILE 1)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDFJAVA_EXAMPLES_GROUPS Java)
set (CMAKE_VERBOSE_MAKEFILE 1)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDFJAVA_EXAMPLES_INTRO Java)
set (CMAKE_VERBOSE_MAKEFILE 1)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT ( HDF5_JAVA_SRC C Java )
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_JAVA_HDF)
add_subdirectory (hdf5lib)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_JAVA_HDF_HDF5 Java)
set (CMAKE_VERBOSE_MAKEFILE 1)

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_JAVA_JNI C CXX)
set (HDF5_JAVA_JNI_CSRCS

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_JAVA_TEST Java)
set (CMAKE_VERBOSE_MAKEFILE 1)

View File

@@ -564,7 +564,6 @@ HDF5_BUILD_TOOLS "Build HDF5 Tools" ON
ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF
HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF
HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF
HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF
HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF
HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF
HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF
@@ -584,6 +583,8 @@ HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection"
HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF
HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF
HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF
HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries,
FALSE to build according to BUILD_SHARED_LIBS" FALSE
HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF
HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
@@ -597,7 +598,7 @@ HDF5_ENABLE_THREADSAFE "Enable Threadsafety"
if (APPLE)
HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF
if (CMAKE_BUILD_TYPE MATCHES Debug)
HDF5_ENABLE_TRACE "Enable API tracing capability" ON
HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF
if (HDF5_TEST_VFD)
HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON
@@ -647,7 +648,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script.
### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ###
#############################################################################################
cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
############################################################################
# Usage:
# ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log

View File

@@ -229,7 +229,7 @@ your application with an installed HDF5 binary.
ctest use of HDF5_Examples.cmake and HDF5_Examples_options.cmake
========================================================================
cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR)
###############################################################################################################
# This script will build and run the examples from a folder
# Execute from a command line:

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TEST)
#-----------------------------------------------------------------------------
@@ -13,9 +13,9 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
#-----------------------------------------------------------------------------
#################################################################################
# Define Test Library Sources
#-----------------------------------------------------------------------------
#################################################################################
set (TEST_LIB_SOURCES
${HDF5_TEST_SOURCE_DIR}/h5test.c
${HDF5_TEST_SOURCE_DIR}/testframe.c
@@ -71,9 +71,9 @@ if (BUILD_SHARED_LIBS)
endif ()
endif ()
#-----------------------------------------------------------------------------
#################################################################################
# If filter plugin tests can be tested
#-----------------------------------------------------------------------------
#################################################################################
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir1")
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir2")
@@ -116,7 +116,7 @@ endif ()
)
endforeach ()
foreach ( plugin_name ${FILTER_PLUGINS_FOR_DIR2})
foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR2})
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
@@ -142,6 +142,10 @@ endif ()
)
endforeach ()
#################################################################################
# Test program sources
#################################################################################
set (testhdf5_SOURCES
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
${HDF5_TEST_SOURCE_DIR}/tarray.c
@@ -170,34 +174,24 @@ set (testhdf5_SOURCES
${HDF5_TEST_SOURCE_DIR}/tvlstr.c
)
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET})
set_target_properties (testhdf5 PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (testhdf5-shared ${testhdf5_SOURCES})
TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
endif ()
set (cache_image_SOURCES
${HDF5_TEST_SOURCE_DIR}/cache_image.c
${HDF5_TEST_SOURCE_DIR}/genall5.c
)
MACRO (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
TARGET_C_PROPERTIES (${file} STATIC " " " ")
target_link_libraries (${file} PUBLIC ${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_C_PROPERTIES (${file}-shared SHARED " " " ")
target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (${file}-shared PROPERTIES FOLDER test)
endif ()
ENDMACRO ()
set (ttsafe_SOURCES
${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
)
set (H5_TESTS
testhdf5 # multiple source
cache
cache_api
cache_image # multiple source
cache_tagging
lheap
ohdr
@@ -210,9 +204,11 @@ set (H5_TESTS
fheap
pool
accum
hyperslab
istore
bittests
dt_arith
page_buffer
dtypes
dsets
cmpd_dset
@@ -233,6 +229,7 @@ set (H5_TESTS
app_ref
enum
set_extent
ttsafe # multiple source
enc_dec_plist
enc_dec_plist_cross_platform
getname
@@ -244,7 +241,6 @@ set (H5_TESTS
cross_read
freespace
mf
page_buffer
vds
file_image
unregister
@@ -253,10 +249,113 @@ set (H5_TESTS
swmr
)
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
TARGET_C_PROPERTIES (${file} STATIC " " " ")
target_link_libraries (${file} PUBLIC ${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_C_PROPERTIES (${file}-shared SHARED " " " ")
target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (${file}-shared PROPERTIES FOLDER test)
endif ()
endmacro ()
set (H5_TESTS_MULTIPLE
testhdf5
cache_image
ttsafe
)
# Only build single source tests here
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE)
ADD_H5_EXE(${test})
endif ()
endforeach ()
##############################################################################
### M U L T I P L E S O U R C E T E S T S ###
##############################################################################
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET})
set_target_properties (testhdf5 PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (testhdf5-shared ${testhdf5_SOURCES})
TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
endif ()
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
TARGET_C_PROPERTIES (cache_image STATIC " " " ")
target_link_libraries (cache_image ${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_C_PROPERTIES (cache_image-shared SHARED " " " ")
target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (cache_image-shared PROPERTIES FOLDER test)
endif ()
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
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 ${ttsafe_SOURCES})
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)
if (HDF5_ENABLE_THREADSAFE)
set_property (TARGET ttsafe-shared
APPEND PROPERTY COMPILE_DEFINITIONS
"H5_HAVE_THREADSAFE"
)
endif ()
endif ()
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
set (H5_CHECK_TESTS
error_test
err_compat
tcheck_version
testmeta
atomic_writer
atomic_reader
links_env
filenotclosed
flushrefresh
)
foreach (test ${H5_CHECK_TESTS})
ADD_H5_EXE(${test})
endforeach ()
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
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\")
else ()
message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
endif ()
"
)
##############################################################################
### S W I M M E R T E S T S ###
##############################################################################
set (H5_SWMR_TESTS
swmr_addrem_writer
swmr_check_compat_vfd
@@ -284,94 +383,6 @@ foreach (test ${H5_VDS_SWMR_TESTS})
ADD_H5_EXE(${test})
endforeach ()
##############################################################################
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
##############################################################################
#-- Adding test for cache_image
add_executable (cache_image
${HDF5_TEST_SOURCE_DIR}/cache_image.c
${HDF5_TEST_SOURCE_DIR}/genall5.c
)
TARGET_C_PROPERTIES (cache_image STATIC " " " ")
target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_image PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (cache_image-shared
${HDF5_TEST_SOURCE_DIR}/cache_image.c
${HDF5_TEST_SOURCE_DIR}/genall5.c
)
TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ")
target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (cache_image-shared PROPERTIES FOLDER test)
endif ()
#-- Adding test for hyperslab
add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
TARGET_C_PROPERTIES (hyperslab STATIC " " " ")
target_link_libraries (hyperslab ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (hyperslab PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (hyperslab-shared ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
TARGET_C_PROPERTIES (hyperslab-shared SHARED " " " ")
target_link_libraries (hyperslab-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (hyperslab-shared PROPERTIES FOLDER test)
if (HDF5_ENABLE_THREADSAFE)
set_property (TARGET hyperslab-shared
APPEND PROPERTY COMPILE_DEFINITIONS
"H5_HAVE_THREADSAFE"
)
endif ()
endif ()
#-- Adding test for ttsafe
add_executable (ttsafe
${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_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_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)
if (HDF5_ENABLE_THREADSAFE)
set_property (TARGET ttsafe-shared
APPEND PROPERTY COMPILE_DEFINITIONS
"H5_HAVE_THREADSAFE"
)
endif ()
endif ()
set (H5_CHECK_TESTS
error_test
err_compat
tcheck_version
testmeta
atomic_writer
atomic_reader
links_env
flushrefresh
filenotclosed
)
foreach (test ${H5_CHECK_TESTS})
ADD_H5_EXE(${test})
endforeach ()
#-- Adding test for accum_swmr_reader
# 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).
@@ -386,18 +397,6 @@ if (BUILD_SHARED_LIBS)
set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader)
endif ()
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
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\")
else ()
message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
endif ()
"
)
##############################################################################
### P L U G I N T E S T S
##############################################################################

View File

@@ -26,27 +26,6 @@ if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files")
endif ()
if (HDF5_TEST_VFD)
set (VFD_LIST
sec2
stdio
core
core_paged
split
multi
family
)
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif ()
foreach (vfdtest ${VFD_LIST})
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
#if (BUILD_SHARED_LIBS)
# file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared")
#endif ()
endforeach ()
endif ()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -75,16 +54,6 @@ foreach (h5_tfile ${HDF5_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
if (HDF5_TEST_VFD)
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_TEST_LIB_files")
if (BUILD_SHARED_LIBS)
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
endforeach ()
endif ()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
@@ -103,16 +72,6 @@ foreach (ref_file ${HDF5_REFERENCE_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
if (HDF5_TEST_VFD)
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_TEST_LIB_files")
if (BUILD_SHARED_LIBS)
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
endforeach ()
endif ()
# --------------------------------------------------------------------
# Copy test files from test/testfiles/plist_files dir to test dir
@@ -238,16 +197,7 @@ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
if (HDF5_TEST_VFD)
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_TEST_LIB_files")
if (BUILD_SHARED_LIBS)
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
endforeach ()
endif ()
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})
@@ -593,97 +543,43 @@ add_test (NAME H5TEST-clear-objects
${HDF5_TEST_BINARY_DIR}/H5TEST
)
set (H5TEST_TESTS
#testhdf5
#cache
cache_api
cache_tagging
lheap
ohdr
stab
gheap
evict_on_close
farray
earray
btree2
fheap
pool
accum
#hyperslab
istore
bittests
dt_arith
dtypes
dsets
cmpd_dset
filter_fail
extend
external
efc
objcopy
links
unlink
twriteorder
big
mtime
fillval
mount
flush1
flush2
app_ref
enum
set_extent
ttsafe
enc_dec_plist
enc_dec_plist_cross_platform
getname
vfd
ntypes
dangle
dtransform
reserved
cross_read
freespace
mf
page_buffer
vds
file_image
unregister
cache_logging
cork
swmr
set (H5TEST_SEPARATE_TESTS
testhdf5
cache
cache_image
)
foreach (test ${H5TEST_TESTS})
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
set_tests_properties (H5TEST-${test} PROPERTIES
DEPENDS H5TEST-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
else ()
if ("${test}" STREQUAL "big" AND CYGWIN)
add_test (NAME H5TEST-${test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
set_tests_properties (H5TEST-${test} PROPERTIES
DEPENDS H5TEST-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
else ()
add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=${test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
if ("${test}" STREQUAL "big" AND CYGWIN)
add_test (NAME H5TEST-${test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
)
else ()
add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=${test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
set_tests_properties (H5TEST-${test} PROPERTIES
DEPENDS H5TEST-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
set_tests_properties (H5TEST-${test} PROPERTIES
DEPENDS H5TEST-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
endforeach ()
@@ -703,28 +599,30 @@ if (BUILD_SHARED_LIBS)
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
foreach (test ${H5TEST_TESTS})
if ("${test}" STREQUAL "big" AND CYGWIN)
add_test (NAME H5TEST-shared-${test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
)
else ()
add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=${test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
if ("${test}" STREQUAL "big" AND CYGWIN)
add_test (NAME H5TEST-shared-${test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
)
else ()
add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=${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-${test} PROPERTIES
DEPENDS H5TEST-shared-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
endif ()
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 ()
set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1)
@@ -734,12 +632,6 @@ if (BUILD_SHARED_LIBS)
set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 1800)
endif ()
##############################################################################
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
##############################################################################
#-- Adding test for cache
if (NOT CYGWIN)
add_test (NAME H5TEST-clear-cache-objects
@@ -787,6 +679,73 @@ set_tests_properties (H5TEST-cache_image PROPERTIES
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
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
)
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
DEPENDS H5TEST-shared-clear-cache-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 1800)
endif ()
endif ()
##############################################################################
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
##############################################################################
# H5_CHECK_TESTS
#---------------
# error_test
# err_compat
# tcheck_version
# testmeta
# atomic_writer
# atomic_reader
# links_env
# filenotclosed
# flushrefresh
##############################################################################
# autotools script tests
# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh.
# NOT CONVERTED tcheck_version is used by testcheck_version.sh.
# NOT CONVERTED accum_swmr_reader is used by accum.c.
# NOT CONVERTED atomic_writer and atomic_reader are standalone programs.
# links_env is used by testlinks_env.sh
# filenotclosed is used by test_filenotclosed.sh
# NOT CONVERTED flushrefresh is used by testflushrefresh.sh.
# NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh
# NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh.
# NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh
# NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG.
# NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly,
# NOT CONVERTED and this lets automake keep all its test programs in one place.
##############################################################################
#-- Adding test for filenotclosed
add_test (
NAME H5TEST-clear-filenotclosed-objects
@@ -899,37 +858,6 @@ add_test (NAME H5TEST-testlibinfo
)
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
)
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
DEPENDS H5TEST-shared-clear-cache-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 1800)
endif ()
#-- Adding test for err_compat
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_test (NAME H5TEST-shared-clear-err_compat-objects
@@ -1068,272 +996,7 @@ set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES
##############################################################################
if (HDF5_TEST_VFD)
set (H5_VFD_TESTS
testhdf5
# cache
cache_api
cache_tagging
lheap
ohdr
stab
gheap
evict_on_close
pool
# accum
farray
earray
btree2
# fheap
hyperslab
istore
bittests
dt_arith
dtypes
dsets
cmpd_dset
filter_fail
extend
external
efc
objcopy
links
unlink
# big
mtime
fillval
mount
flush1
flush2
app_ref
enum
set_extent
ttsafe
getname
# vfd
ntypes
dangle
dtransform
reserved
cross_read
freespace
mf
# error_test
# err_compat
#tcheck_version
# testmeta
# links_env
unregister
)
if (NOT CYGWIN)
set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache)
endif ()
# Windows only macro
macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
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 ()
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}-${test}-shared
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared"
)
endif ()
endif ()
else ()
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
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 ()
endif ()
else ()
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};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
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
endif ()
endif ()
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
foreach (test ${H5_VFD_TESTS})
if (WIN32)
CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
else ()
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"
)
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 ()
endif ()
endforeach ()
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)
set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800)
if (NOT CYGWIN)
set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
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 1800)
if (NOT CYGWIN AND NOT WIN32)
set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
endif ()
endif ()
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"
)
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
TIMEOUT 1800
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
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${vfdname}-fheap-shared"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
TIMEOUT 1800
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
endif ()
endif ()
endmacro ()
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
endforeach ()
include (CMakeVFDTests.cmake)
endif ()
##############################################################################
@@ -1355,6 +1018,7 @@ if (HDF5_BUILD_GENERATORS)
gen_bad_offset
gen_bad_ohdr
gen_bogus
gen_bounds
gen_cross
gen_deflate
gen_filters

303
test/CMakeVFDTests.cmake Normal file
View File

@@ -0,0 +1,303 @@
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
##############################################################################
##############################################################################
### T E S T I N G ###
##############################################################################
##############################################################################
# included from CMakeTEsts.cmake
set (VFD_LIST
sec2
stdio
core
core_paged
split
multi
family
)
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif ()
foreach (vfdtest ${VFD_LIST})
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared")
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 ()
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 ()
##############################################################################
##############################################################################
### V F D T E S T S ###
##############################################################################
##############################################################################
set (H5_VFD_SKIP_TESTS
cache
accum
fheap
big
vfd
error_test
err_compat
tcheck_version
testmeta
links_env
)
if (NOT CYGWIN)
list(REMOVE_ITEM ${H5_VFD_SKIP_TESTS} big cache)
endif ()
# Windows only macro
macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
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 ()
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}-${test}-shared
COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared"
)
endif ()
endif ()
else ()
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
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 ()
endif ()
else ()
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};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
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${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}
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}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
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 ()
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
foreach (test ${H5_TESTS})
if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS)
if (WIN32)
CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
else ()
DO_VFD_TEST (${test} ${vfdname} ${resultcode})
endif ()
endforeach ()
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)
set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800)
if (NOT CYGWIN)
set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
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 1800)
if (NOT CYGWIN AND NOT WIN32)
set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
endif ()
endif ()
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"
)
set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
TIMEOUT 1800
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
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${vfdname}-fheap-shared"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
TIMEOUT 1800
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
)
endif ()
endif ()
endif ()
endmacro ()
# Run test with different Virtual File Driver
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
endforeach ()

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TEST_PAR)
#-----------------------------------------------------------------------------
@@ -49,6 +49,7 @@ set (H5P_TESTS
t_mpi
t_bigio
t_cache
t_cache_image
t_pflush1
t_pflush2
t_pread

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_LIB)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5COPY)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5DIFF)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5DUMP)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5FC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5IMPORT)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5JAM)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5LS)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5REPACK)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_H5STAT)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_SRC_MISC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5COPY)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5DIFF)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5DUMP)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5FC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5IMPORT)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5JAM)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5LS)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5REPACK)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_H5STAT)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_MISC)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_MISC_VDS)
#-----------------------------------------------------------------------------

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.2.2)
cmake_minimum_required (VERSION 3.3.2)
PROJECT (HDF5_TOOLS_TEST_PERFORM )
#-----------------------------------------------------------------------------