diff options
-rw-r--r-- | test/CMakeLists.txt | 21 | ||||
-rw-r--r-- | test/CMakePassthroughVOLTests.cmake | 2 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 19 | ||||
-rw-r--r-- | test/CMakeVFDTests.cmake | 2 |
4 files changed, 42 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0b9911f..c7888b8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -62,7 +62,7 @@ if (BUILD_SHARED_LIBS) endif () ################################################################################# -# If filter plugin tests can be tested +# If filter and vol plugin tests can be tested ################################################################################# if (BUILD_SHARED_LIBS) # make plugins dir @@ -131,6 +131,11 @@ if (BUILD_SHARED_LIBS) ) endforeach () + ################################################################################# + # make vol plugins dir + ################################################################################# + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/null_vol_plugin_dir") + #----------------------------------------------------------------------------- # Define VOL Plugin Test Sources #----------------------------------------------------------------------------- @@ -159,7 +164,7 @@ if (BUILD_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "$<TARGET_FILE:${HDF5_VOL_PLUGIN_LIB_TARGET}>" - "${CMAKE_BINARY_DIR}/vol/$<TARGET_FILE_NAME:${HDF5_VOL_PLUGIN_LIB_TARGET}>" + "${CMAKE_BINARY_DIR}/null_vol_plugin_dir/$<TARGET_FILE_NAME:${HDF5_VOL_PLUGIN_LIB_TARGET}>" ) endforeach () endif () @@ -458,12 +463,24 @@ if (BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (filter_plugin SHARED) target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) set_target_properties (filter_plugin PROPERTIES FOLDER test) + + add_executable (vol_plugin ${HDF5_TEST_SOURCE_DIR}/vol_plugin.c) + target_include_directories(vol_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (vol_plugin SHARED) + target_link_libraries (vol_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) + set_target_properties (vol_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}) set_target_properties (filter_plugin PROPERTIES FOLDER test) + + add_executable (vol_plugin ${HDF5_TEST_SOURCE_DIR}/vol_plugin.c) + target_include_directories(vol_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (vol_plugin STATIC) + target_link_libraries (vol_plugin PRIVATE ${HDF5_TEST_LIB_TARGET}) + set_target_properties (vol_plugin PROPERTIES FOLDER test) endif () ############################################################################## diff --git a/test/CMakePassthroughVOLTests.cmake b/test/CMakePassthroughVOLTests.cmake index 8c7d797..928654e 100644 --- a/test/CMakePassthroughVOLTests.cmake +++ b/test/CMakePassthroughVOLTests.cmake @@ -99,6 +99,8 @@ endif () tcheck_version testmeta links_env + external_env + vds_env ) if (NOT CYGWIN) list (REMOVE_ITEM H5_VOL_SKIP_TESTS big cache) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 8c4e1ce..3e6add0 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1293,6 +1293,25 @@ endif () ############################################################################## ############################################################################## +############################################################################## +### V O L P L U G I N T E S T S +############################################################################## +if (BUILD_SHARED_LIBS) + if (WIN32) + set (CMAKE_SEP "\;") + set (BIN_REL_PATH "../../") + else () + set (CMAKE_SEP ":") + set (BIN_REL_PATH "../") + endif () + + add_test (NAME H5PLUGIN-vol_plugin COMMAND $<TARGET_FILE:vol_plugin>) + set_tests_properties (H5PLUGIN-vol_plugin PROPERTIES + ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/null_vol_plugin_dir;srcdir=${HDF5_TEST_BINARY_DIR}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} + ) +endif () + if (HDF5_TEST_PASSTHROUGH_VOL) include (CMakePassthroughVOLTests.cmake) endif () diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 64ccacd..383b2f4 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -102,6 +102,8 @@ endif () tcheck_version testmeta links_env + external_env + vds_env ) if (NOT CYGWIN) list (REMOVE_ITEM H5_VFD_SKIP_TESTS big cache) |